ArmEmitter: Set the P bit for 0-offset LDR/STR like AS does (but not W, which is the update part of indexed instructions)

This commit is contained in:
Henrik Rydgard 2013-01-28 22:40:06 +01:00
parent 4f8cdb8370
commit 630c025fd5

View File

@ -487,8 +487,8 @@ void ARMXEmitter::MRS (ARMReg dest)
void ARMXEmitter::WriteStoreOp(u32 op, ARMReg dest, ARMReg src, Operand2 op2)
{
if (op2.GetData() == 0) // Don't index
Write32(condition | 0x00800000 | (op << 20) | (dest << 16) | (src << 12) | op2.Imm12());
if (op2.GetData() == 0) // set the preindex bit, but not the W bit!
Write32(condition | 0x01800000 | (op << 20) | (dest << 16) | (src << 12) | op2.Imm12());
else
Write32(condition | (op << 20) | (3 << 23) | (dest << 16) | (src << 12) | op2.Imm12());
}