Make NON_SAVING_SETJMP usable again.
authorJames E Wilson <wilson@specifixinc.com>
Sun, 30 Nov 2003 06:32:57 +0000 (06:32 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Sun, 30 Nov 2003 06:32:57 +0000 (22:32 -0800)
* final.c (final_start_function): Delete code for NON_SAVING_SETJMP.
* reload1.c (reload): Re-add it here.

From-SVN: r74052

gcc/ChangeLog
gcc/final.c
gcc/reload1.c

index a236a6add9fe2bcb3b410754e88377f2a2f5d7fe..22908dedea9cdbaf293b5ee542819793e712dec1 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-29  James E Wilson  <wilson@specifixinc.com>
+
+       * final.c (final_start_function): Delete code for NON_SAVING_SETJMP.
+       * reload1.c (reload): Re-add it here.
+
 2003-11-30  Alan Modra  <amodra@bigpond.net.au>
 
        * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Don't
index e93f4bbd3beb4a3c77a0e17bc3810c1374e11754..820cb680ab20addab1624e09c1b3b5ec75a438db 100644 (file)
@@ -1336,19 +1336,6 @@ final_start_function (rtx first ATTRIBUTE_UNUSED, FILE *file,
 
   this_is_asm_operands = 0;
 
-#ifdef NON_SAVING_SETJMP
-  /* A function that calls setjmp should save and restore all the
-     call-saved registers on a system where longjmp clobbers them.  */
-  if (NON_SAVING_SETJMP && current_function_calls_setjmp)
-    {
-      int i;
-
-      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-       if (!call_used_regs[i])
-         regs_ever_live[i] = 1;
-    }
-#endif
-
   last_filename = locator_file (prologue_locator);
   last_linenum = locator_line (prologue_locator);
 
index 64dc0be4bf481f4b20744b57ae29f072613259b1..b234a6a1707df9719d4976299844e2dded383bac 100644 (file)
@@ -673,6 +673,17 @@ reload (rtx first, int global)
       if (! call_used_regs[i] && ! fixed_regs[i] && ! LOCAL_REGNO (i))
        regs_ever_live[i] = 1;
 
+#ifdef NON_SAVING_SETJMP
+  /* A function that calls setjmp should save and restore all the
+     call-saved registers on a system where longjmp clobbers them.  */
+  if (NON_SAVING_SETJMP && current_function_calls_setjmp)
+    {
+      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+       if (! call_used_regs[i])
+         regs_ever_live[i] = 1;
+    }
+#endif
+
   /* Find all the pseudo registers that didn't get hard regs
      but do have known equivalent constants or memory slots.
      These include parameters (known equivalent to parameter slots)