[llvm-commits] [llvm] r43680 - in /llvm/trunk: lib/Target/X86/X86ATTAsmPrinter.cpp test/CodeGen/X86/2007-11-04-rip-immediate-constant.ll
Evan Cheng
evan.cheng at apple.com
Sun Nov 4 11:57:20 PST 2007
It's correct. Thanks!
Evan
On Nov 4, 2007, at 11:23 AM, Chris Lattner wrote:
> Author: lattner
> Date: Sun Nov 4 13:23:28 2007
> New Revision: 43680
>
> URL: http://llvm.org/viewvc/llvm-project?rev=43680&view=rev
> Log:
> Fix PR1761 by not printing (rip) suffix when in -static mode.
> Evan, please review this.
>
> Added:
> llvm/trunk/test/CodeGen/X86/2007-11-04-rip-immediate-constant.ll
> Modified:
> llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/
> X86ATTAsmPrinter.cpp?rev=43680&r1=43679&r2=43680&view=diff
>
> ======================================================================
> ========
> --- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Sun Nov 4
> 13:23:28 2007
> @@ -361,7 +361,8 @@
> O << "@GOT";
> else
> O << "@GOTOFF";
> - } else if (Subtarget->isPICStyleRIPRel() && !NotRIPRel) {
> + } else if (Subtarget->isPICStyleRIPRel() && !NotRIPRel &&
> + TM.getRelocationModel() != Reloc::Static) {
> if ((GV->isDeclaration() ||
> GV->hasWeakLinkage() ||
> GV->hasLinkOnceLinkage()) &&
>
> Added: llvm/trunk/test/CodeGen/X86/2007-11-04-rip-immediate-
> constant.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/
> X86/2007-11-04-rip-immediate-constant.ll?rev=43680&view=auto
>
> ======================================================================
> ========
> --- llvm/trunk/test/CodeGen/X86/2007-11-04-rip-immediate-
> constant.ll (added)
> +++ llvm/trunk/test/CodeGen/X86/2007-11-04-rip-immediate-
> constant.ll Sun Nov 4 13:23:28 2007
> @@ -0,0 +1,11 @@
> +; RUN: llvm-as < %s | llc -relocation-model=static | grep {foo _str$}
> +; PR1761
> +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-
> i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-
> a0:0:64-s0:64:64-f80:128:128"
> +target triple = "x86_64-apple-darwin8"
> + at str = internal constant [12 x i8] c"init/main.c\00" ; <[12 x i8]
> *> [#uses=1]
> +
> +define i32 @unknown_bootoption() {
> +entry:
> + tail call void asm sideeffect "foo ${0:c}\0A", "i,~{dirflag},~
> {fpsr},~{flags}"( i8* getelementptr ([12 x i8]* @str, i32 0, i64 0) )
> + ret i32 undef
> +}
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list