Fix ADD(4) and MOV(3)

This commit is contained in:
Jeffrey Pfau 2013-04-16 23:52:30 -07:00
parent 4b4914afb6
commit c143dec77d
1 changed files with 11 additions and 2 deletions

View File

@ -255,9 +255,18 @@ DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(MVN, cpu->gprs[rd] = ~cpu->gprs[rn]; THUMB_
DEFINE_INSTRUCTION_WITH_HIGH_EX_THUMB(NAME ## 10, 8, 0, BODY) \
DEFINE_INSTRUCTION_WITH_HIGH_EX_THUMB(NAME ## 11, 8, 8, BODY)
DEFINE_INSTRUCTION_WITH_HIGH_THUMB(ADD4, cpu->gprs[rd] += cpu->gprs[rm])
DEFINE_INSTRUCTION_WITH_HIGH_THUMB(ADD4,
cpu->gprs[rd] += cpu->gprs[rm];
if (rd == ARM_PC) {
THUMB_WRITE_PC;
})
DEFINE_INSTRUCTION_WITH_HIGH_THUMB(CMP3, int32_t aluOut = cpu->gprs[rd] - cpu->gprs[rm]; THUMB_SUBTRACTION_S(cpu->gprs[rd], cpu->gprs[rm], aluOut))
DEFINE_INSTRUCTION_WITH_HIGH_THUMB(MOV3, cpu->gprs[rd] = cpu->gprs[rm])
DEFINE_INSTRUCTION_WITH_HIGH_THUMB(MOV3,
cpu->gprs[rd] = cpu->gprs[rm];
if (rd == ARM_PC) {
THUMB_WRITE_PC;
})
#define DEFINE_IMMEDIATE_WITH_REGISTER_EX_THUMB(NAME, RD, BODY) \
DEFINE_INSTRUCTION_THUMB(NAME, \