mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-11 15:13:04 +00:00
arm_dyncom_thumb: Implement REV, REV16, and REVSH.
This commit is contained in:
parent
595fe49a8f
commit
b64dea80ce
|
@ -274,9 +274,19 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) {
|
||||||
? 0xE24DDF00 // SUB
|
? 0xE24DDF00 // SUB
|
||||||
: 0xE28DDF00) // ADD
|
: 0xE28DDF00) // ADD
|
||||||
|(tinstr & 0x007F); // off7
|
|(tinstr & 0x007F); // off7
|
||||||
} else if ((tinstr & 0x0F00) == 0x0e00)
|
} else if ((tinstr & 0x0F00) == 0x0e00) {
|
||||||
*ainstr = 0xEF000000 | 0x180000; // base | BKPT mask
|
*ainstr = 0xEF000000 | 0x180000; // base | BKPT mask
|
||||||
else {
|
} else if ((tinstr & 0x0F00) == 0x0a00) {
|
||||||
|
static const ARMword subset[3] = {
|
||||||
|
0xE6BF0F30, // REV
|
||||||
|
0xE6BF0FB0, // REV16
|
||||||
|
0xE6FF0FB0, // REVSH
|
||||||
|
};
|
||||||
|
|
||||||
|
*ainstr = subset[BITS(tinstr, 6, 7)] // base
|
||||||
|
| (BITS(tinstr, 0, 2) << 12) // Rd
|
||||||
|
| BITS(tinstr, 3, 5); // Rm
|
||||||
|
} else {
|
||||||
static const ARMword subset[4] = {
|
static const ARMword subset[4] = {
|
||||||
0xE92D0000, // STMDB sp!,{rlist}
|
0xE92D0000, // STMDB sp!,{rlist}
|
||||||
0xE92D4000, // STMDB sp!,{rlist,lr}
|
0xE92D4000, // STMDB sp!,{rlist,lr}
|
||||||
|
|
Loading…
Reference in a new issue