Commit 180bde4f by Richard Sandiford Committed by Richard Sandiford

sh.c (calc_live_regs): Update check for PIC liveness in compact code.

	* config/sh/sh.c (calc_live_regs): Update check for PIC liveness
	in compact code.

From-SVN: r59212
parent e300c78c
2002-11-18 Richard Sandiford <rsandifo@redhat.com>
* config/sh/sh.c (calc_live_regs): Update check for PIC liveness
in compact code.
2002-11-18 Richard Sandiford <rsandifo@redhat.com>
* config/sh/sh.md (initialize_trampoline): Do not force the
trampoline address into R0_REGS here.
......
......@@ -4456,7 +4456,11 @@ calc_live_regs (count_ptr, live_regs_mask)
&& reg != RETURN_ADDRESS_POINTER_REGNUM
&& reg != T_REG && reg != GBR_REG)
: (/* Only push those regs which are used and need to be saved. */
regs_ever_live[reg] && ! call_used_regs[reg]))
(TARGET_SHCOMPACT
&& flag_pic
&& current_function_args_info.call_cookie
&& reg == PIC_OFFSET_TABLE_REGNUM)
|| (regs_ever_live[reg] && ! call_used_regs[reg])))
{
live_regs_mask[reg / 32] |= 1 << (reg % 32);
count += GET_MODE_SIZE (REGISTER_NATURAL_MODE (reg));
......
2002-11-18 Richard Sandiford <rsandifo@redhat.com>
* gcc.c-torture/execute/20021118-1.c: New test.
2002-11-16 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20021116-1.c: New test.
......
struct s { int f[4]; };
int foo (struct s s, int x1, int x2, int x3, int x4, int x5, int x6, int x7)
{
return s.f[3] + x7;
}
int main ()
{
struct s s = { 1, 2, 3, 4 };
if (foo (s, 100, 200, 300, 400, 500, 600, 700) != 704)
abort ();
exit (0);
}
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