+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
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. */
: 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. */
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);
}"
[(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