Commit 9e3e4fab by Andrew Pinski Committed by Kyrylo Tkachov

[AArch64] Work around PR target/64971

2016-04-20  Andrew Pinski  <apinski@cavium.com>
            Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/64971
	* config/aarch64/aarch64.md (sibcall): Force call
	address to be DImode for ILP32.
	(sibcall_value): Likewise.

	* gcc.c-torture/compile/pr37433-1.c: New testcase.


Co-Authored-By: Kyrylo Tkachov <kyrylo.tkachov@arm.com>

From-SVN: r235281
parent ce6d77a4
2016-04-20 Andrew Pinski <apinski@cavium.com>
Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/64971
* config/aarch64/aarch64.md (sibcall): Force call
address to be DImode for ILP32.
(sibcall_value): Likewise.
2016-04-20 H.J. Lu <hongjiu.lu@intel.com> 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
* doc/invoke.texi: Replace -skip-rax-setup with -mskip-rax-setup. * doc/invoke.texi: Replace -skip-rax-setup with -mskip-rax-setup.
......
...@@ -855,6 +855,13 @@ ...@@ -855,6 +855,13 @@
|| aarch64_is_noplt_call_p (callee))) || aarch64_is_noplt_call_p (callee)))
XEXP (operands[0], 0) = force_reg (Pmode, callee); XEXP (operands[0], 0) = force_reg (Pmode, callee);
/* FIXME: This is a band-aid. Need to analyze why expand_expr_addr_expr
is generating an SImode symbol reference. See PR 64971. */
if (TARGET_ILP32
&& GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF
&& GET_MODE (XEXP (operands[0], 0)) == SImode)
XEXP (operands[0], 0) = convert_memory_address (Pmode,
XEXP (operands[0], 0));
if (operands[2] == NULL_RTX) if (operands[2] == NULL_RTX)
operands[2] = const0_rtx; operands[2] = const0_rtx;
...@@ -886,6 +893,14 @@ ...@@ -886,6 +893,14 @@
|| aarch64_is_noplt_call_p (callee))) || aarch64_is_noplt_call_p (callee)))
XEXP (operands[1], 0) = force_reg (Pmode, callee); XEXP (operands[1], 0) = force_reg (Pmode, callee);
/* FIXME: This is a band-aid. Need to analyze why expand_expr_addr_expr
is generating an SImode symbol reference. See PR 64971. */
if (TARGET_ILP32
&& GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF
&& GET_MODE (XEXP (operands[1], 0)) == SImode)
XEXP (operands[1], 0) = convert_memory_address (Pmode,
XEXP (operands[1], 0));
if (operands[3] == NULL_RTX) if (operands[3] == NULL_RTX)
operands[3] = const0_rtx; operands[3] = const0_rtx;
......
2016-04-20 Andrew Pinski <apinski@cavium.com>
PR target/64971
* gcc.c-torture/compile/pr37433-1.c: New testcase.
2016-04-20 Arnaud Charlet <charlet@adacore.com> 2016-04-20 Arnaud Charlet <charlet@adacore.com>
* gnat.dg/self1.adb: Remove now incorrect test. * gnat.dg/self1.adb: Remove now incorrect test.
......
void regex_subst(void)
{
const void *subst = "";
(*(void (*)(int))subst) (0);
}
void foobar (void)
{
int x;
(*(void (*)(void))&x) ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment