mirror of https://github.com/mgba-emu/mgba.git
ARM7: Fix setting spsr privilege bits when spsr is empty
This commit is contained in:
parent
723b91dfe3
commit
6b1cbbd5e2
1
CHANGES
1
CHANGES
|
@ -26,6 +26,7 @@ Bugfixes:
|
|||
- SDL: Fix SDL 1.2 build
|
||||
- ARM7: Fix flags on SBC/RSC
|
||||
- Util: Fix realloc semantics in utf16to8
|
||||
- ARM7: Fix setting spsr privilege bits when spsr is empty
|
||||
Misc:
|
||||
- GBA: Slightly optimize GBAProcessEvents
|
||||
- Qt: Add preset for DualShock 4
|
||||
|
|
|
@ -659,7 +659,7 @@ DEFINE_INSTRUCTION_ARM(MSRR,
|
|||
int32_t operand = cpu->gprs[opcode & 0x0000000F];
|
||||
int32_t mask = (c ? 0x000000FF : 0) | (f ? 0xFF000000 : 0);
|
||||
mask &= PSR_USER_MASK | PSR_PRIV_MASK | PSR_STATE_MASK;
|
||||
cpu->spsr.packed = (cpu->spsr.packed & ~mask) | (operand & mask);)
|
||||
cpu->spsr.packed = (cpu->spsr.packed & ~mask) | (operand & mask) | 0x00000010;)
|
||||
|
||||
DEFINE_INSTRUCTION_ARM(MRS, \
|
||||
int rd = (opcode >> 12) & 0xF; \
|
||||
|
@ -701,7 +701,7 @@ DEFINE_INSTRUCTION_ARM(MSRRI,
|
|||
int32_t operand = ROR(opcode & 0x000000FF, rotate);
|
||||
int32_t mask = (c ? 0x000000FF : 0) | (f ? 0xFF000000 : 0);
|
||||
mask &= PSR_USER_MASK | PSR_PRIV_MASK | PSR_STATE_MASK;
|
||||
cpu->spsr.packed = (cpu->spsr.packed & ~mask) | (operand & mask);)
|
||||
cpu->spsr.packed = (cpu->spsr.packed & ~mask) | (operand & mask) | 0x00000010;)
|
||||
|
||||
DEFINE_INSTRUCTION_ARM(SWI, cpu->irqh.swi32(cpu, opcode & 0xFFFFFF))
|
||||
|
||||
|
|
Loading…
Reference in New Issue