This is an automated email from the git hooks/post-receive script.
unknown user pushed a commit to branch hjl/indbr/master in repository gcc.
commit 7d7e95221d47aee6824192ee5a6f45c01bf4b9c8 Author: H.J. Lu hjl.tools@gmail.com Date: Thu Jul 23 13:09:27 2015 -0700
Generate indirect branch relocation --- gcc/config/i386/i386.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c9dbe47..d02cace 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -25801,7 +25801,8 @@ static bool ix86_nopic_noplt_attribute_p (rtx call_op) { if (flag_pic || ix86_cmodel == CM_LARGE - || !TARGET_64BIT || TARGET_MACHO || TARGET_SEH || TARGET_PECOFF + || (!TARGET_64BIT && HAVE_LD_IX86_INDBR_RELOC == 0) + || TARGET_MACHO || TARGET_SEH || TARGET_PECOFF || SYMBOL_REF_LOCAL_P (call_op)) return false;
@@ -25826,8 +25827,14 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
if (SIBLING_CALL_P (insn)) { + /* ix86_nopic_noplt_attribute_p returns false for PIC. */ if (direct_p && ix86_nopic_noplt_attribute_p (call_op)) - xasm = "%!jmp\t*%p0@GOTPCREL(%%rip)"; + { + if (TARGET_64BIT) + xasm = "%!jmp\t*%p0@GOTPCREL(%%rip)"; + else + xasm = "%!jmp\t*%p0@GOT"; + } else if (direct_p) xasm = "%!jmp\t%P0"; /* SEH epilogue detection requires the indirect branch case @@ -25871,8 +25878,14 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op) seh_nop_p = true; }
+ /* ix86_nopic_noplt_attribute_p returns false for PIC. */ if (direct_p && ix86_nopic_noplt_attribute_p (call_op)) - xasm = "%!call\t*%p0@GOTPCREL(%%rip)"; + { + if (TARGET_64BIT) + xasm = "%!call\t*%p0@GOTPCREL(%%rip)"; + else + xasm = "%!call\t*%p0@GOT"; + } else if (direct_p) xasm = "%!call\t%P0"; else