mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
When lowering certain atomics, we need to copy the memoperand from the old
atomic operation to the new one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b2ff885aae
commit
f595266b91
@ -6010,7 +6010,9 @@ X86TargetLowering::EmitAtomicBitwiseWithCustomInserter(MachineInstr *bInstr,
|
||||
for (int i=0; i <= lastAddrIndx; ++i)
|
||||
(*MIB).addOperand(*argOpers[i]);
|
||||
MIB.addReg(t2);
|
||||
|
||||
assert(bInstr->hasOneMemOperand() && "Unexpected number of memoperand");
|
||||
(*MIB).addMemOperand(*F, *bInstr->memoperands_begin());
|
||||
|
||||
MIB = BuildMI(newMBB, TII->get(X86::MOV32rr), destOper.getReg());
|
||||
MIB.addReg(X86::EAX);
|
||||
|
||||
@ -6107,6 +6109,8 @@ X86TargetLowering::EmitAtomicMinMaxWithCustomInserter(MachineInstr *mInstr,
|
||||
for (int i=0; i <= lastAddrIndx; ++i)
|
||||
(*MIB).addOperand(*argOpers[i]);
|
||||
MIB.addReg(t3);
|
||||
assert(mInstr->hasOneMemOperand() && "Unexpected number of memoperand");
|
||||
(*MIB).addMemOperand(*F, *mInstr->memoperands_begin());
|
||||
|
||||
MIB = BuildMI(newMBB, TII->get(X86::MOV32rr), destOper.getReg());
|
||||
MIB.addReg(X86::EAX);
|
||||
|
Loading…
Reference in New Issue
Block a user