mirror of https://github.com/mgba-emu/mgba.git
Implement LSL(2)
This commit is contained in:
parent
0bfb77106b
commit
14100f19d1
|
@ -196,7 +196,23 @@ DEFINE_DATA_FORM_3_INSTRUCTION_THUMB(SUB2, THUMB_SUBTRACTION(cpu->gprs[rd], cpu-
|
|||
|
||||
DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(AND, cpu->gprs[rd] = cpu->gprs[rd] & cpu->gprs[rn]; THUMB_NEUTRAL_S( , , cpu->gprs[rd]))
|
||||
DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(EOR, cpu->gprs[rd] = cpu->gprs[rd] ^ cpu->gprs[rn]; THUMB_NEUTRAL_S( , , cpu->gprs[rd]))
|
||||
DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(LSL2, ARM_STUB)
|
||||
DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(LSL2,
|
||||
int rs = cpu->gprs[rn] & 0xFF;
|
||||
if (rs) {
|
||||
if (rs < 32) {
|
||||
cpu->cpsr.c = cpu->gprs[rd] & (1 << (32 - rs));
|
||||
cpu->gprs[rd] <<= rs;
|
||||
} else {
|
||||
if (rs > 32) {
|
||||
cpu->cpsr.c = 0;
|
||||
} else {
|
||||
cpu->cpsr.c = cpu->gprs[rd] & 0x00000001;
|
||||
}
|
||||
cpu->gprs[rd] = 0;
|
||||
}
|
||||
}
|
||||
THUMB_NEUTRAL_S( , , cpu->gprs[rd]))
|
||||
|
||||
DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(LSR2,
|
||||
int rs = cpu->gprs[rn] & 0xFF;
|
||||
if (rs) {
|
||||
|
|
Loading…
Reference in New Issue