aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E Wilson <wilson@specifixinc.com>2003-11-30 06:32:57 +0000
committerJim Wilson <wilson@gcc.gnu.org>2003-11-29 22:32:57 -0800
commit5583e33da85818e2b25b5995e6d503a7444b030a (patch)
tree4853bd6350a58c11315ec3c4f350bd5963479644
parent1ff8f81ab3d8242b575a2d2c533f357042c2e8d1 (diff)
downloadgcc-5583e33da85818e2b25b5995e6d503a7444b030a.zip
gcc-5583e33da85818e2b25b5995e6d503a7444b030a.tar.gz
gcc-5583e33da85818e2b25b5995e6d503a7444b030a.tar.bz2
Make NON_SAVING_SETJMP usable again.
* final.c (final_start_function): Delete code for NON_SAVING_SETJMP. * reload1.c (reload): Re-add it here. From-SVN: r74052
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/final.c13
-rw-r--r--gcc/reload1.c11
3 files changed, 16 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a236a6a..22908de 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/final.c b/gcc/final.c
index e93f4bb..820cb68 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -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);
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 64dc0be..b234a6a 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -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)