[llvm-branch-commits] [llvm-branch] r73405 - in /llvm/branches/Apple/Bender: lib/Target/X86/X86InstrInfo.td test/CodeGen/X86/call-imm.ll

Bill Wendling isanbard at gmail.com
Mon Jun 15 12:15:59 PDT 2009


Author: void
Date: Mon Jun 15 14:15:59 2009
New Revision: 73405

URL: http://llvm.org/viewvc/llvm-project?rev=73405&view=rev
Log:
--- Merging r72154 into '.':
U    test/CodeGen/X86/call-imm.ll
U    lib/Target/X86/X86InstrInfo.td


Modified:
    llvm/branches/Apple/Bender/lib/Target/X86/X86InstrInfo.td
    llvm/branches/Apple/Bender/test/CodeGen/X86/call-imm.ll

Modified: llvm/branches/Apple/Bender/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Bender/lib/Target/X86/X86InstrInfo.td?rev=73405&r1=73404&r2=73405&view=diff

==============================================================================
--- llvm/branches/Apple/Bender/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/branches/Apple/Bender/lib/Target/X86/X86InstrInfo.td Mon Jun 15 14:15:59 2009
@@ -235,6 +235,7 @@
 def SmallCode    : Predicate<"TM.getCodeModel() == CodeModel::Small">;
 def NotSmallCode : Predicate<"TM.getCodeModel() != CodeModel::Small">;
 def IsStatic     : Predicate<"TM.getRelocationModel() == Reloc::Static">;
+def IsNotPIC     : Predicate<"TM.getRelocationModel() != Reloc::PIC_">;
 def OptForSpeed  : Predicate<"!OptForSize">;
 def FastBTMem    : Predicate<"!Subtarget->isBTMemSlow()">;
 
@@ -555,7 +556,7 @@
       Uses = [ESP] in {
     def CALLpcrel32 : Ii32<0xE8, RawFrm, (outs), (ins i32imm:$dst,variable_ops),
                            "call\t${dst:call}", [(X86call imm:$dst)]>,
-                      Requires<[In32BitMode]>;
+                      Requires<[In32BitMode, IsNotPIC]>;
     def CALL32r     : I<0xFF, MRM2r, (outs), (ins GR32:$dst, variable_ops),
                         "call\t{*}$dst", [(X86call GR32:$dst)]>;
     def CALL32m     : I<0xFF, MRM2m, (outs), (ins i32mem:$dst, variable_ops),

Modified: llvm/branches/Apple/Bender/test/CodeGen/X86/call-imm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Bender/test/CodeGen/X86/call-imm.ll?rev=73405&r1=73404&r2=73405&view=diff

==============================================================================
--- llvm/branches/Apple/Bender/test/CodeGen/X86/call-imm.ll (original)
+++ llvm/branches/Apple/Bender/test/CodeGen/X86/call-imm.ll Mon Jun 15 14:15:59 2009
@@ -1,4 +1,5 @@
 ; RUN: llvm-as < %s | llc -march=x86    | grep {call.*12345678}
+; RUN: llvm-as < %s | llc -march=x86 -relocation-model=pic | not grep {call.*12345678}
 
 ; Call to immediate is not safe on x86-64 unless we *know* that the
 ; call will be within 32-bits pcrel from the dest immediate.
@@ -7,6 +8,7 @@
 
 ; PR3666
 ; PR3773
+; rdar://6904453
 
 define i32 @main() nounwind {
 entry:





More information about the llvm-branch-commits mailing list