This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch for PR target/32963 (Problem with caller save registers)


After checking in my IA64 division code changes I found some new
failures related to saving/restoring caller save registers.  I tracked
down the problem to Honza's patch to caller-save.c that uses lazy
evaluation to speed up compilation.  This patch makes caller-save behave
like it did before Honza's patch and fixes the test cases in PR
target/32963 and causes no regressions on IA64 Linux or HP-UX.

OK to checkin?

Steve Ellcey
sje@cup.hp.com


2007-08-15  Steve Ellcey  <sje@cup.hp.com>

	PR target/32963
	caller-save.c (reg_save_code): Set invalide status on restore code.
	
Index: caller-save.c
===================================================================
--- caller-save.c	(revision 127504)
+++ caller-save.c	(working copy)
@@ -113,6 +113,7 @@ reg_save_code (int reg, enum machine_mod
   if (!HARD_REGNO_MODE_OK (reg, mode))
      {
        cached_reg_save_code[reg][mode] = -1;
+       cached_reg_restore_code[reg][mode] = -1;
        return -1;
      }
 
@@ -124,6 +125,7 @@ reg_save_code (int reg, enum machine_mod
 
   /* Force re-recognition of the modified insns.  */
   INSN_CODE (saveinsn) = -1;
+  INSN_CODE (restinsn) = -1;
 
   cached_reg_save_code[reg][mode] = recog_memoized (saveinsn);
   cached_reg_restore_code[reg][mode] = recog_memoized (restinsn);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]