mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 13:27:41 -07:00
slightly fix error in writeback handling
This commit is contained in:
parent
ec241a8224
commit
fce0555a09
@ -115,6 +115,7 @@ void LoadSingle(ARM* cpu, u8 rd, u8 rn, s32 offset)
|
||||
if constexpr (size == 32) val = ROR(val, ((addr&0x3)<<3));
|
||||
|
||||
|
||||
if constexpr (writeback >= Writeback::Post) addr += offset;
|
||||
if constexpr (writeback != Writeback::None) cpu->R[rn] = addr;
|
||||
|
||||
if (rd == 15)
|
||||
@ -160,8 +161,9 @@ void StoreSingle(ARM* cpu, u8 rd, u8 rn, s32 offset)
|
||||
((ARMv5*)cpu)->DataAbort();
|
||||
return;
|
||||
}
|
||||
|
||||
if constexpr (writeback != Writeback::None) cpu->R[rn] += offset;
|
||||
|
||||
if constexpr (writeback >= Writeback::Post) addr += offset;
|
||||
if constexpr (writeback != Writeback::None) cpu->R[rn] = addr;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user