------- Additional Comments From bjoern dot m dot haase at web dot de  
2005-09-04 10:35 -------
Indeed IMHO the problem stems from the patch:   
   
+2005-01-22  Roger Sayle  <[EMAIL PROTECTED]>   
+   
+       PR middle-end/19378   
+       * config/avr/avr.c (avr_hard_regno_mode_ok): Rewrite.   
+   
   
IMO the problem stems from the change   
   
-  /* Reload can use r28:r29 for reload register and for frame pointer   
-   in one insn. It's wrong. We must disable it.  */   
-  if (mode != Pmode && reload_in_progress && frame_pointer_required_p ()   
-      && regno <= REG_Y && (regno + GET_MODE_SIZE (mode)) >= (REG_Y + 1))   
+  /* Otherwise disallow all regno/mode combinations that span r28:r29.  */   
+  if (regno <= (REG_Y + 1) && (regno + GET_MODE_SIZE (mode)) >= (REG_Y + 1))   
     return 0;   
   
Denis Chertykov's older version using "frame_pointer_required_p ()" has now   
vanished. A problem during register allocation has been removed by Roger  
Sayle's patch. However, the old frame pointer bug has been re-introduced.   
   
My suggestion is to use the following implementation. (according patch to   
today's head attached) This patch has passed regression tests on head without   
new regressions on head on the c-testsuite for compilation and simulator  
excecution for the atmega128.   
I also verified on an old snapshot that had exposed PR21990 that this patch  
resolves PR21990.  
  
I'll post this message also on gcc-patches.  
  
Yours,  
  
Bjoern  

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21990

Reply via email to