gcc/
PR target/43700
* config/mips/mips.c (mips_cfun_call_saved_reg_p): Handle global
registers.
gcc/testsuite/
* gcc.target/mips/reg-var-1.c: New test.
From-SVN: r174408
+2011-05-29 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/43700
+ * config/mips/mips.c (mips_cfun_call_saved_reg_p): Handle global
+ registers.
+
2011-05-29 Richard Sandiford <rdsandiford@googlemail.com>
PR target/43995
static bool
mips_cfun_call_saved_reg_p (unsigned int regno)
{
+ /* If the user makes an ordinarily-call-saved register global,
+ that register is no longer call-saved. */
+ if (global_regs[regno])
+ return false;
+
/* Interrupt handlers need to save extra registers. */
if (cfun->machine->interrupt_handler_p
&& mips_interrupt_extra_call_saved_reg_p (regno))
+2011-05-29 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/reg-var-1.c: New test.
+
2011-05-25 Uros Bizjak <ubizjak@gmail.com>
PR target/49133
--- /dev/null
+/* { dg-do run } */
+register int g asm ("$18");
+
+void __attribute__((noinline))
+test (void)
+{
+ g = g + 1;
+}
+
+int
+main (void)
+{
+ g = 2;
+ test ();
+ return g != 3;
+}