diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ef319be33b64..b758d4265600 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-03-01 Uros Bizjak + + PR target/70027 + * config/i386/i386.c (ix86_output_call_insn): Add -masm=intel + asm dialect alternatives to explicit GOTPCREL calls. + 2016-03-01 Eric Botcazou PR ada/70017 @@ -20,7 +26,8 @@ 2016-03-01 Andreas Krebbel * config/s390/constraints.md ("jm8"): New constraint. - * config/s390/predicates.md ("const_int_8bitset_operand"): New predicate. + * config/s390/predicates.md ("const_int_8bitset_operand"): New + predicate. * config/s390/s390.md ("*setmem_long", "*setmem_long_and"): Merge into ... ("*setmem_long"): New pattern. @@ -127,7 +134,7 @@ 2016-03-01 Andreas Krebbel * config/s390/predicates.md (const_int_6bitset_operand): New - predicates. + predicate. * config/s390/s390.md: Include subst.md. ("rotl3"): New expander. ("rotl3", "*rotl3_and"): Merge insn definitions into @@ -578,8 +585,8 @@ 2016-02-23 Evandro Menezes - * config/aarch64/aarch64.c (exynosm1_tunings): Enable the Newton - series for reciprocal square root in Exynos M1. + * config/aarch64/aarch64.c (exynosm1_tunings): Enable the Newton + series for reciprocal square root in Exynos M1. 2016-02-23 Martin Sebor diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d8a2909b75f1..7e2a85cd7e9a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -27293,14 +27293,17 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op) if (SIBLING_CALL_P (insn)) { - if (direct_p && ix86_nopic_noplt_attribute_p (call_op)) - xasm = "%!jmp\t*%p0@GOTPCREL(%%rip)"; - else if (direct_p) - xasm = "%!jmp\t%P0"; + if (direct_p) + { + if (ix86_nopic_noplt_attribute_p (call_op)) + xasm = "%!jmp\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}"; + else + xasm = "%!jmp\t%P0"; + } /* SEH epilogue detection requires the indirect branch case to include REX.W. */ else if (TARGET_SEH) - xasm = "%!rex.W jmp %A0"; + xasm = "%!rex.W jmp\t%A0"; else xasm = "%!jmp\t%A0"; @@ -27338,10 +27341,13 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op) seh_nop_p = true; } - if (direct_p && ix86_nopic_noplt_attribute_p (call_op)) - xasm = "%!call\t*%p0@GOTPCREL(%%rip)"; - else if (direct_p) - xasm = "%!call\t%P0"; + if (direct_p) + { + if (ix86_nopic_noplt_attribute_p (call_op)) + xasm = "%!call\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}"; + else + xasm = "%!call\t%P0"; + } else xasm = "%!call\t%A0"; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bf76ea7b0758..033a0d3f35fd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-03-01 Uros Bizjak + + PR target/70027 + * gcc.target/i386/pr70027.c: New test. + 2016-03-01 Eric Botcazou * gcc.dg/pr70017.c: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr70027.c b/gcc/testsuite/gcc.target/i386/pr70027.c new file mode 100644 index 000000000000..b4b483074ede --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70027.c @@ -0,0 +1,11 @@ +/* { dg-do assemble } */ +/* { dg-options "-fno-plt -masm=intel" } */ +/* { dg-require-effective-target masm_intel } */ + +extern void bar (int); + +void +foo (void) +{ + bar (123); +}