Closed lemoncmd closed 10 months ago
The test passes on real hardware so it's correct. But you are also right, the ARM specification mentions that system and user mode have no SPSR.
In user and system modes reads from SPSR read CPSR but writes to SPSR appear to be ignored.
That would explain why the test works.
mrs r0, cpsr
msr spsr, r0
mrs r1, spsr
cmp r1, r0
Because it does nothing.
The test is now performed in FIQ mode to prevent confusion.
Test 254 reads from and writes to SPSR, but it is supposed to be in system mode while the test since test 253 changes to it. ARM Architecture Reference Manual says that system mode does not have SPSR. Should my emulator have SPSR for system mode? Which behavior is correct?