mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
ARM: remove special cases for Darwin dynamic-no-pic mode.
These are handled almost identically to static mode (and ELF's global address materialisation), except that a symbol may have "$non_lazy_ptr" appended. This can be handled by passing appropriate flags along with the instruction instead of using entirely separate pseudo-instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -685,19 +685,20 @@ unsigned ARMFastISel::ARMMaterializeGV(const GlobalValue *GV, MVT VT) {
|
||||
if (Subtarget->useMovt() &&
|
||||
Subtarget->isTargetDarwin() == (RelocM != Reloc::Static)) {
|
||||
unsigned Opc;
|
||||
unsigned char TF = 0;
|
||||
if (Subtarget->isTargetDarwin() && RelocM != Reloc::Static)
|
||||
TF = ARMII::MO_NONLAZY;
|
||||
|
||||
switch (RelocM) {
|
||||
case Reloc::PIC_:
|
||||
Opc = isThumb2 ? ARM::t2MOV_ga_pcrel : ARM::MOV_ga_pcrel;
|
||||
break;
|
||||
case Reloc::DynamicNoPIC:
|
||||
Opc = isThumb2 ? ARM::t2MOV_ga_dyn : ARM::MOV_ga_dyn;
|
||||
break;
|
||||
default:
|
||||
Opc = isThumb2 ? ARM::t2MOVi32imm : ARM::MOVi32imm;
|
||||
break;
|
||||
}
|
||||
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(Opc),
|
||||
DestReg).addGlobalAddress(GV));
|
||||
DestReg).addGlobalAddress(GV, 0, TF));
|
||||
} else {
|
||||
// MachineConstantPool wants an explicit alignment.
|
||||
unsigned Align = TD.getPrefTypeAlignment(GV->getType());
|
||||
|
Reference in New Issue
Block a user