diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2016-03-01 21:11:19 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2016-03-01 21:11:19 +0100 |
commit | a0c0699d0521bce1e71eb46a814f40d6d54a79a3 (patch) | |
tree | d44880a1bf295fc829e611596ee1bea485ff6ba0 /gcc | |
parent | 0ae3ef47651a0c164d212416096246583bfff820 (diff) | |
download | gcc-a0c0699d0521bce1e71eb46a814f40d6d54a79a3.zip gcc-a0c0699d0521bce1e71eb46a814f40d6d54a79a3.tar.gz gcc-a0c0699d0521bce1e71eb46a814f40d6d54a79a3.tar.bz2 |
re PR target/70027 (invalid assembly syntax generated with -fno-plt -masm=intel)
PR target/70027
* config/i386/i386.c (ix86_output_call_insn): Add -masm=intel
asm dialect alternatives to explicit GOTPCREL calls.
testsuite/ChangeLog:
PR target/70027
* gcc.target/i386/pr70027.c: New test.
From-SVN: r233864
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 24 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr70027.c | 11 |
4 files changed, 42 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ef319be..b758d42 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-03-01 Uros Bizjak <ubizjak@gmail.com> + + 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 <ebotcazou@adacore.com> PR ada/70017 @@ -20,7 +26,8 @@ 2016-03-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * 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<setmem_and>"): New pattern. @@ -127,7 +134,7 @@ 2016-03-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * config/s390/predicates.md (const_int_6bitset_operand): New - predicates. + predicate. * config/s390/s390.md: Include subst.md. ("rotl<mode>3"): New expander. ("rotl<mode>3", "*rotl<mode>3_and"): Merge insn definitions into @@ -578,8 +585,8 @@ 2016-02-23 Evandro Menezes <e.menezes@samsung.com> - * 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 <msebor@redhat.com> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d8a2909..7e2a85c 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 bf76ea7..033a0d3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-03-01 Uros Bizjak <ubizjak@gmail.com> + + PR target/70027 + * gcc.target/i386/pr70027.c: New test. + 2016-03-01 Eric Botcazou <ebotcazou@adacore.com> * 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 0000000..b4b4830 --- /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); +} |