mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
Don't accept globals as matching 'i' constraint
in PIC modes (in accordance with existing comment). gcc.apple/asm-block-25.c llvm-svn: 74886
This commit is contained in:
parent
619bba465f
commit
5487047295
@ -8803,10 +8803,15 @@ void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Otherwise, this isn't something we can handle, reject it.
|
||||
return;
|
||||
}
|
||||
// If we require an extra load to get this address, as in PIC mode, we
|
||||
// can't accept it.
|
||||
if (Subtarget->GVRequiresExtraLoad(GA->getGlobal(),
|
||||
getTargetMachine(), false))
|
||||
return;
|
||||
|
||||
if (hasMemory)
|
||||
Op = LowerGlobalAddress(GA->getGlobal(), Op.getDebugLoc(), Offset, DAG);
|
||||
|
Loading…
Reference in New Issue
Block a user