Commit 758ed9b2 by Paul Brook Committed by Paul Brook

re PR target/28516 (arm_unwind_emit_set, at config/arm/arm.c:15419 with -fexceptions)

2006-09-19  Paul Brook  <paul@codesourcery.com>

	PR target/28516
	gcc/
	* config/arm/arm.c (arm_unwind_emit_set): Handle reg = sp + const.

	gcc/testsuite/
	* gcc.dg/nested-func-5.c: New test.

From-SVN: r117056
parent dc6c7714
2006-09-19 Paul Brook <paul@codesourcery.com>
PR target/28516
* config/arm/arm.c (arm_unwind_emit_set): Handle reg = sp + const.
2006-09-17 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/28887
......
......@@ -15415,6 +15415,15 @@ arm_unwind_emit_set (FILE * asm_out_file, rtx p)
/* Move from sp to reg. */
asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0));
}
else if (GET_CODE (e1) == PLUS
&& GET_CODE (XEXP (e1, 0)) == REG
&& REGNO (XEXP (e1, 0)) == SP_REGNUM
&& GET_CODE (XEXP (e1, 1)) == CONST_INT)
{
/* Set reg to offset from sp. */
asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n",
REGNO (e0), (int)INTVAL(XEXP (e1, 1)));
}
else
abort ();
break;
......
2006-09-19 Paul Brook <paul@codesourcery.com>
PR target/28516
* gcc.dg/nested-func-5.c: New test.
2006-09-19 Ben Elliston <bje@au.ibm.com>
* lib/target-supports.exp (check_effective_target_tls): Compile
/* { dg-do compile } */
/* { dg-options "-fexceptions" } */
/* PR28516: ICE generating ARM unwind directives for nested functions. */
void ex(int (*)(void));
void foo(int i)
{
int bar(void)
{
return i;
}
ex(bar);
}
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