mirror of https://github.com/mgba-emu/mgba.git
Implement MOV(1)
This commit is contained in:
parent
9ab3b0c20a
commit
21df1c48c2
|
@ -16,6 +16,10 @@ void ThumbStep(struct ARMCore* cpu) {
|
|||
// Instruction definitions
|
||||
// Beware pre-processor insanity
|
||||
|
||||
#define THUMB_NEUTRAL_S(M, N, D) \
|
||||
cpu->cpsr.n = ARM_SIGN(D); \
|
||||
cpu->cpsr.z = !(D);
|
||||
|
||||
#define APPLY(F, ...) F(__VA_ARGS__)
|
||||
|
||||
#define COUNT_1(EMITTER, PREFIX, ...) \
|
||||
|
@ -113,6 +117,7 @@ DEFINE_DATA_FORM_2_INSTRUCTION_THUMB(SUB, ARM_STUB)
|
|||
#define DEFINE_DATA_FORM_3_INSTRUCTION_EX_THUMB(NAME, RD, BODY) \
|
||||
DEFINE_INSTRUCTION_THUMB(NAME, \
|
||||
int rd = RD; \
|
||||
int immediate = opcode & 0x00FF; \
|
||||
BODY;)
|
||||
|
||||
#define DEFINE_DATA_FORM_3_INSTRUCTION_THUMB(NAME, BODY) \
|
||||
|
@ -120,7 +125,7 @@ DEFINE_DATA_FORM_2_INSTRUCTION_THUMB(SUB, ARM_STUB)
|
|||
|
||||
DEFINE_DATA_FORM_3_INSTRUCTION_THUMB(ADD2, ARM_STUB)
|
||||
DEFINE_DATA_FORM_3_INSTRUCTION_THUMB(CMP1, ARM_STUB)
|
||||
DEFINE_DATA_FORM_3_INSTRUCTION_THUMB(MOV1, ARM_STUB)
|
||||
DEFINE_DATA_FORM_3_INSTRUCTION_THUMB(MOV1, cpu->gprs[rd] = immediate; THUMB_NEUTRAL_S(, , cpu->gprs[rd]))
|
||||
DEFINE_DATA_FORM_3_INSTRUCTION_THUMB(SUB2, ARM_STUB)
|
||||
|
||||
#define DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(NAME, BODY) \
|
||||
|
|
Loading…
Reference in New Issue