diff mbox

[AVR] Fix PR51050: Invalid RTL sharing of fp

Message ID 4EE92FD7.4040409@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay Dec. 14, 2011, 11:23 p.m. UTC
This is fix for the RP. Is uses (reg:QI 28) instead of building SUBREG of frame
pointer.

Johann

	PR target/51050
	* config/avr/avr.c (expand_epilogue): Don't build SUBREG of fp.
	(avr_prologue_setup_frame): Ditto.

Comments

Denis Chertykov Dec. 15, 2011, 10:36 a.m. UTC | #1
2011/12/15 Georg-Johann Lay <avr@gjlay.de>:
> This is fix for the RP. Is uses (reg:QI 28) instead of building SUBREG of frame
> pointer.
>
> Johann
>
>        PR target/51050
>        * config/avr/avr.c (expand_epilogue): Don't build SUBREG of fp.
>        (avr_prologue_setup_frame): Ditto.

Approved.

Denis.
diff mbox

Patch

Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c	(revision 182327)
+++ gcc/config/avr/avr.c	(working copy)
@@ -994,7 +994,7 @@  avr_prologue_setup_frame (HOST_WIDE_INT
               /* The high byte (r29) does not change:
                  Prefer SUBI (1 cycle) over ABIW (2 cycles, same size).  */
 
-              my_fp = simplify_gen_subreg (QImode, fp, Pmode, 0);
+              my_fp = all_regs_rtx[FRAME_POINTER_REGNUM];
             }
 
           /************  Method 1: Adjust frame pointer  ************/
@@ -1292,7 +1292,7 @@  expand_epilogue (bool sibcall_p)
           /* The high byte (r29) does not change:
              Prefer SUBI (1 cycle) over SBIW (2 cycles).  */
                   
-          my_fp = simplify_gen_subreg (QImode, fp, Pmode, 0);
+          my_fp = all_regs_rtx[FRAME_POINTER_REGNUM];
         }
               
       /********** Method 1: Adjust fp register  **********/