mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
[PowerPC] Implement atomic NAND operations as actual NAND
This changes the implementation of atomic NAND operations from "a & ~b" (compatible with GCC < 4.4) to actual "~(a & b)" (compatible with GCC >= 4.4). This is in line with the common-code and ARM back-end change implemented in r212433. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212547 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b8245a4599
commit
b7fdc7ff16
@ -6833,13 +6833,13 @@ PPCTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||
BB = EmitAtomicBinary(MI, BB, true, PPC::XOR8);
|
||||
|
||||
else if (MI->getOpcode() == PPC::ATOMIC_LOAD_NAND_I8)
|
||||
BB = EmitPartwordAtomicBinary(MI, BB, true, PPC::ANDC);
|
||||
BB = EmitPartwordAtomicBinary(MI, BB, true, PPC::NAND);
|
||||
else if (MI->getOpcode() == PPC::ATOMIC_LOAD_NAND_I16)
|
||||
BB = EmitPartwordAtomicBinary(MI, BB, false, PPC::ANDC);
|
||||
BB = EmitPartwordAtomicBinary(MI, BB, false, PPC::NAND);
|
||||
else if (MI->getOpcode() == PPC::ATOMIC_LOAD_NAND_I32)
|
||||
BB = EmitAtomicBinary(MI, BB, false, PPC::ANDC);
|
||||
BB = EmitAtomicBinary(MI, BB, false, PPC::NAND);
|
||||
else if (MI->getOpcode() == PPC::ATOMIC_LOAD_NAND_I64)
|
||||
BB = EmitAtomicBinary(MI, BB, true, PPC::ANDC8);
|
||||
BB = EmitAtomicBinary(MI, BB, true, PPC::NAND8);
|
||||
|
||||
else if (MI->getOpcode() == PPC::ATOMIC_LOAD_SUB_I8)
|
||||
BB = EmitPartwordAtomicBinary(MI, BB, true, PPC::SUBF);
|
||||
|
Loading…
x
Reference in New Issue
Block a user