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
This commit is contained in:
Uros Bizjak 2016-03-01 21:11:19 +01:00
parent 0ae3ef4765
commit a0c0699d05
4 changed files with 42 additions and 13 deletions

View File

@ -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>

View File

@ -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";

View File

@ -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.

View File

@ -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);
}