diff --git a/src/gba/GBA-thumb.cpp b/src/gba/GBA-thumb.cpp index c28fc9fd..400ebde6 100644 --- a/src/gba/GBA-thumb.cpp +++ b/src/gba/GBA-thumb.cpp @@ -1417,6 +1417,12 @@ static INSN_REGPARM void thumb45_3(u32 opcode) CMP_RD_RS; } +// MOV Rd, Rs +static INSN_REGPARM void thumb46_0(u32 opcode) +{ + reg[opcode&7].I = reg[((opcode>>3)&7)].I; +} + // MOV Rd, Hs static INSN_REGPARM void thumb46_1(u32 opcode) { @@ -2185,7 +2191,7 @@ static insnfunc_t thumbInsnTable[1024] = { thumb40_0,thumb40_1,thumb40_2,thumb40_3,thumb41_0,thumb41_1,thumb41_2,thumb41_3, // 40 thumb42_0,thumb42_1,thumb42_2,thumb42_3,thumb43_0,thumb43_1,thumb43_2,thumb43_3, thumbUI,thumb44_1,thumb44_2,thumb44_3,thumbUI,thumb45_1,thumb45_2,thumb45_3, - thumbUI,thumb46_1,thumb46_2,thumb46_3,thumb47,thumb47,thumbUI,thumbUI, + thumb46_0,thumb46_1,thumb46_2,thumb46_3,thumb47,thumb47,thumbUI,thumbUI, thumb48,thumb48,thumb48,thumb48,thumb48,thumb48,thumb48,thumb48, // 48 thumb48,thumb48,thumb48,thumb48,thumb48,thumb48,thumb48,thumb48, thumb48,thumb48,thumb48,thumb48,thumb48,thumb48,thumb48,thumb48, diff --git a/src/gba/GBAinline.h b/src/gba/GBAinline.h index 9ef71d73..fa7d0d38 100644 --- a/src/gba/GBAinline.h +++ b/src/gba/GBAinline.h @@ -149,9 +149,8 @@ unreadable: break; } - if(address & 3) { + if(oldAddress & 3) { #ifdef C_CORE - int shift = (address & 3) << 3; value = (value >> shift) | (value << (32 - shift)); #else #ifdef __GNUC__