diff options
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/Mips/MipsSubtarget.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Target/Mips/MipsTargetMachine.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/Mips/MipsSubtarget.cpp b/llvm/lib/Target/Mips/MipsSubtarget.cpp index 530920b03c3..48f58a55aad 100644 --- a/llvm/lib/Target/Mips/MipsSubtarget.cpp +++ b/llvm/lib/Target/Mips/MipsSubtarget.cpp @@ -65,9 +65,9 @@ MipsSubtarget::MipsSubtarget(const TargetMachine &TM, const Module &M, HasCondMov = true; } - // Abicall is the default for O32 ABI and is ignored - // for EABI. - if (NotABICall || isABI_EABI()) + // Abicall is the default for O32 ABI, but is disabled within EABI and in + // static code. + if (NotABICall || isABI_EABI() || (TM.getRelocationModel() == Reloc::Static)) HasABICall = false; // TODO: disable when handling 64 bit symbols in the future. diff --git a/llvm/lib/Target/Mips/MipsTargetMachine.cpp b/llvm/lib/Target/Mips/MipsTargetMachine.cpp index b24e498ae47..276868cbb20 100644 --- a/llvm/lib/Target/Mips/MipsTargetMachine.cpp +++ b/llvm/lib/Target/Mips/MipsTargetMachine.cpp @@ -46,7 +46,7 @@ MipsTargetMachine(const Module &M, const std::string &FS, bool isLittle=false): TLInfo(*this) { // Abicall enables PIC by default - if (Subtarget.hasABICall() && (getRelocationModel() != Reloc::Static)) + if (Subtarget.hasABICall()) setRelocationModel(Reloc::PIC_); // TODO: create an option to enable long calls, like -mlong-calls, |