mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
nand atomic requires opposite operand ordering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91371 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2e141d744e
commit
c67b556b5b
@ -3190,9 +3190,15 @@ ARMTargetLowering::EmitAtomicBinary(MachineInstr *MI, MachineBasicBlock *BB,
|
||||
// fallthrough --> exitMBB
|
||||
BB = loopMBB;
|
||||
AddDefaultPred(BuildMI(BB, dl, TII->get(ldrOpc), dest).addReg(ptr));
|
||||
if (BinOpcode)
|
||||
AddDefaultPred(BuildMI(BB, dl, TII->get(BinOpcode), scratch2).
|
||||
addReg(dest).addReg(incr)).addReg(0);
|
||||
if (BinOpcode) {
|
||||
// operand order needs to go the other way for NAND
|
||||
if (BinOpcode == ARM::BICrr || BinOpcode == ARM::t2BICrr)
|
||||
AddDefaultPred(BuildMI(BB, dl, TII->get(BinOpcode), scratch2).
|
||||
addReg(incr).addReg(dest)).addReg(0);
|
||||
else
|
||||
AddDefaultPred(BuildMI(BB, dl, TII->get(BinOpcode), scratch2).
|
||||
addReg(dest).addReg(incr)).addReg(0);
|
||||
}
|
||||
|
||||
AddDefaultPred(BuildMI(BB, dl, TII->get(strOpc), scratch).addReg(scratch2)
|
||||
.addReg(ptr));
|
||||
|
Loading…
x
Reference in New Issue
Block a user