re PR target/17377 (cris.md bug in "return" pattern trigged by __builtin_return_address)
PR target/17377 * config/cris/cris-protos.h (cris_return_address_on_stack): Declare. * config/cris/cris.c (cris_return_address_on_stack): New function. * config/cris/cris.md ("return"): For location of return address, also check cris_return_address_on_stack. From-SVN: r87251
This commit is contained in:
parent
da3107f38b
commit
b241674235
4 changed files with 25 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2004-09-09 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
PR target/17377
|
||||
* config/cris/cris-protos.h (cris_return_address_on_stack): Declare.
|
||||
* config/cris/cris.c (cris_return_address_on_stack): New function.
|
||||
* config/cris/cris.md ("return"): For location of return address,
|
||||
also check cris_return_address_on_stack.
|
||||
|
||||
2004-09-09 Diego Novillo <dnovillo@redhat.com>
|
||||
|
||||
* tree-outof-ssa.c (coalesce_abnormal_edges): Fix typo in
|
||||
|
|
|
@ -47,6 +47,8 @@ extern int cris_cfun_uses_pic_table (void);
|
|||
extern void cris_target_asm_named_section (const char *, unsigned int);
|
||||
#endif /* RTX_CODE */
|
||||
|
||||
extern int cris_return_address_on_stack (void);
|
||||
|
||||
extern void cris_pragma_expand_mul (struct cpp_reader *);
|
||||
|
||||
/* Need one that returns an int; usable in expressions. */
|
||||
|
|
|
@ -1700,6 +1700,15 @@ cris_return_addr_rtx (int count, rtx frameaddr ATTRIBUTE_UNUSED)
|
|||
: NULL_RTX;
|
||||
}
|
||||
|
||||
/* Accessor used in cris.md:return because cfun->machine isn't available
|
||||
there. */
|
||||
|
||||
int
|
||||
cris_return_address_on_stack ()
|
||||
{
|
||||
return cfun->machine->needs_return_address_on_stack;
|
||||
}
|
||||
|
||||
/* This used to be the INITIAL_FRAME_POINTER_OFFSET worker; now only
|
||||
handles FP -> SP elimination offset. */
|
||||
|
||||
|
|
|
@ -3415,7 +3415,8 @@
|
|||
if (i >= 0)
|
||||
sprintf (rd, \"movem [$sp+],$%s\", reg_names [i]);
|
||||
|
||||
if (regs_ever_live[CRIS_SRP_REGNUM])
|
||||
if (regs_ever_live[CRIS_SRP_REGNUM]
|
||||
|| cris_return_address_on_stack ())
|
||||
{
|
||||
if (*rd)
|
||||
output_asm_insn (rd, operands);
|
||||
|
@ -3433,7 +3434,10 @@
|
|||
}"
|
||||
[(set (attr "slottable")
|
||||
(if_then_else
|
||||
(ne (symbol_ref "regs_ever_live[CRIS_SRP_REGNUM]") (const_int 0))
|
||||
(ne (symbol_ref
|
||||
"(regs_ever_live[CRIS_SRP_REGNUM]
|
||||
|| cris_return_address_on_stack ())")
|
||||
(const_int 0))
|
||||
(const_string "no") ; If jump then not slottable.
|
||||
(if_then_else
|
||||
(ne (symbol_ref
|
||||
|
|
Loading…
Add table
Reference in a new issue