[llvm-commits] [llvm] r56228 - in /llvm/trunk/lib/Target/Mips: MipsSubtarget.cpp MipsTargetMachine.cpp

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Mon Sep 15 14:06:58 PDT 2008


Author: bruno
Date: Mon Sep 15 16:06:55 2008
New Revision: 56228

URL: http://llvm.org/viewvc/llvm-project?rev=56228&view=rev
Log:
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.


Modified:
    llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp
    llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp?rev=56228&r1=56227&r2=56228&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp Mon Sep 15 16:06:55 2008
@@ -65,9 +65,9 @@
     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.

Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp?rev=56228&r1=56227&r2=56228&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp Mon Sep 15 16:06:55 2008
@@ -46,7 +46,7 @@
   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, 





More information about the llvm-commits mailing list