-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
pmfhl
and pmthl
missing the .fmt
specifier
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* SPDX-FileCopyrightText: © 2024 Decompollaborate */ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
/* | ||
31---------26------------------------------10------6-5----------0 | ||
|0 1 1 1 0 0| | fmt |1 1 0 0 0 0| | ||
------6----------------------------------------5----------6------ | ||
|-------00------|-------01------|-------10------|-------11------| | ||
000 | PMFHL.LW | PMFHL.UW | PMFHL.SLW | PMFHL.LH | | ||
001 | PMFHL.SH | --- | --- | --- | | ||
010 | --- | --- | --- | --- | | ||
011 | --- | --- | --- | --- | | ||
100 | --- | --- | --- | --- | | ||
101 | --- | --- | --- | --- | | ||
110 | --- | --- | --- | --- | | ||
111 | --- | --- | --- | --- | | ||
hi |---------------|---------------|---------------|---------------| | ||
*/ | ||
|
||
RABBITIZER_DEF_INSTR_ID_ALTNAME( | ||
r5900, 0x00, pmfhl_lw, pmfhl.lw, | ||
.operands={RAB_OPERAND_cpu_rd}, | ||
.modifiesRd=true | ||
) // Parallel Move From Hi/Lo register | ||
|
||
RABBITIZER_DEF_INSTR_ID_ALTNAME( | ||
r5900, 0x01, pmfhl_uw, pmfhl.uw, | ||
.operands={RAB_OPERAND_cpu_rd}, | ||
.modifiesRd=true | ||
) // Parallel Move From Hi/Lo register | ||
|
||
RABBITIZER_DEF_INSTR_ID_ALTNAME( | ||
r5900, 0x02, pmfhl_slw, pmfhl.slw, | ||
.operands={RAB_OPERAND_cpu_rd}, | ||
.modifiesRd=true | ||
) // Parallel Move From Hi/Lo register | ||
|
||
RABBITIZER_DEF_INSTR_ID_ALTNAME( | ||
r5900, 0x03, pmfhl_lh, pmfhl.lh, | ||
.operands={RAB_OPERAND_cpu_rd}, | ||
.modifiesRd=true | ||
) // Parallel Move From Hi/Lo register | ||
|
||
RABBITIZER_DEF_INSTR_ID_ALTNAME( | ||
r5900, 0x04, pmfhl_sh, pmfhl.sh, | ||
.operands={RAB_OPERAND_cpu_rd}, | ||
.modifiesRd=true | ||
) // Parallel Move From Hi/Lo register |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* SPDX-FileCopyrightText: © 2024 Decompollaborate */ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
/* | ||
31---------26------------------------------10------6-5----------0 | ||
|0 1 1 1 0 0| | fmt |1 1 0 0 0 1| | ||
------6----------------------------------------5----------6------ | ||
|-------00------|-------01------|-------10------|-------11------| | ||
000 | PMTHL.LW | --- | --- | --- | | ||
001 | --- | --- | --- | --- | | ||
010 | --- | --- | --- | --- | | ||
011 | --- | --- | --- | --- | | ||
100 | --- | --- | --- | --- | | ||
101 | --- | --- | --- | --- | | ||
110 | --- | --- | --- | --- | | ||
111 | --- | --- | --- | --- | | ||
hi |---------------|---------------|---------------|---------------| | ||
*/ | ||
|
||
RABBITIZER_DEF_INSTR_ID_ALTNAME( | ||
r5900, 0x00, pmthl_lw, pmthl.lw, | ||
.operands={RAB_OPERAND_cpu_rs}, | ||
.readsRs=true | ||
) // Parallel Move To Hi/Lo register |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* SPDX-FileCopyrightText: © 2024 Decompollaborate */ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
#include "rabbitizer.h" | ||
|
||
#include <string.h> | ||
#include <stdlib.h> | ||
#include <assert.h> | ||
|
||
#include "expected_disasm_utils.h" | ||
|
||
#define TEST_ENTRY_C(word, imm, expected) TEST_ENTRY(RABBITIZER_INSTRCAT_R5900, word, imm, expected,) | ||
|
||
// TODO: fill | ||
const TestEntry test_entries[] = { | ||
TEST_ENTRY_C(0x70001030, NULL, "pmfhl.lw $v0"), | ||
TEST_ENTRY_C(0x70001070, NULL, "pmfhl.uw $v0"), | ||
TEST_ENTRY_C(0x700010B0, NULL, "pmfhl.slw $v0"), | ||
TEST_ENTRY_C(0x700010F0, NULL, "pmfhl.lh $v0"), | ||
TEST_ENTRY_C(0x70001130, NULL, "pmfhl.sh $v0"), | ||
TEST_ENTRY_C(0x70000031, NULL, "pmthl.lw $zero"), | ||
}; | ||
|
||
size_t test_entries_len = ARRAY_COUNT(test_entries); |