diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-09-15 21:06:55 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-09-15 21:06:55 +0000 |
commit | b3d72996947710d76aded92da00e895c7b37e686 (patch) | |
tree | 473e41082497e7d5a4745b9af046e9453f2c2b23 /lib/Target | |
parent | 5eb0cecbc5dd370e33d4e0ab1abee7ce8597ca9c (diff) | |
download | llvm-b3d72996947710d76aded92da00e895c7b37e686.tar.gz llvm-b3d72996947710d76aded92da00e895c7b37e686.tar.bz2 llvm-b3d72996947710d76aded92da00e895c7b37e686.tar.xz |
Fixed Bug 2751
http://llvm.org/bugs/show_bug.cgi?id=2751
Abicall was enabled even when static code model was provided
in the command line.
The correct behavior is to disable abicall when static is
specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/Mips/MipsSubtarget.cpp | 6 | ||||
-rw-r--r-- | lib/Target/Mips/MipsTargetMachine.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/Mips/MipsSubtarget.cpp b/lib/Target/Mips/MipsSubtarget.cpp index 530920b03c..48f58a55aa 100644 --- a/lib/Target/Mips/MipsSubtarget.cpp +++ b/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/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp index b24e498ae4..276868cbb2 100644 --- a/lib/Target/Mips/MipsTargetMachine.cpp +++ b/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, |