===================================================================
@@ -110,7 +110,7 @@ extern void out_shift_with_cnt (const ch
extern reg_class_t avr_mode_code_base_reg_class (enum machine_mode, RTX_CODE, RTX_CODE);
extern bool avr_regno_mode_code_ok_for_base_p (int, enum machine_mode, RTX_CODE, RTX_CODE);
extern rtx avr_incoming_return_addr_rtx (void);
-extern rtx avr_legitimize_reload_address (rtx, enum machine_mode, int, int, int, int, rtx (*)(rtx,int));
+extern rtx avr_legitimize_reload_address (rtx*, enum machine_mode, int, int, int, int, rtx (*)(rtx,int));
#endif /* RTX_CODE */
#ifdef REAL_VALUE_TYPE
===================================================================
@@ -1356,11 +1356,13 @@ avr_legitimize_address (rtx x, rtx oldx,
than 63 bytes or for R++ or --R addressing. */
rtx
-avr_legitimize_reload_address (rtx x, enum machine_mode mode,
+avr_legitimize_reload_address (rtx *px, enum machine_mode mode,
int opnum, int type, int addr_type,
int ind_levels ATTRIBUTE_UNUSED,
rtx (*mk_memloc)(rtx,int))
{
+ rtx x = *px;
+
if (avr_log.legitimize_reload_address)
avr_edump ("\n%?:%m %r\n", mode, x);
@@ -1372,7 +1374,7 @@ avr_legitimize_reload_address (rtx x, en
opnum, RELOAD_OTHER);
if (avr_log.legitimize_reload_address)
- avr_edump (" RCLASS = %R\n IN = %r\n OUT = %r\n",
+ avr_edump (" RCLASS.1 = %R\n IN = %r\n OUT = %r\n",
POINTER_REGS, XEXP (x, 0), XEXP (x, 0));
return x;
@@ -1398,7 +1400,7 @@ avr_legitimize_reload_address (rtx x, en
1, addr_type);
if (avr_log.legitimize_reload_address)
- avr_edump (" RCLASS = %R\n IN = %r\n OUT = %r\n",
+ avr_edump (" RCLASS.2 = %R\n IN = %r\n OUT = %r\n",
POINTER_REGS, XEXP (mem, 0), NULL_RTX);
push_reload (mem, NULL_RTX, &XEXP (x, 0), NULL,
@@ -1406,7 +1408,7 @@ avr_legitimize_reload_address (rtx x, en
opnum, type);
if (avr_log.legitimize_reload_address)
- avr_edump (" RCLASS = %R\n IN = %r\n OUT = %r\n",
+ avr_edump (" RCLASS.2 = %R\n IN = %r\n OUT = %r\n",
BASE_POINTER_REGS, mem, NULL_RTX);
return x;
@@ -1415,12 +1417,12 @@ avr_legitimize_reload_address (rtx x, en
else if (! (frame_pointer_needed
&& XEXP (x, 0) == frame_pointer_rtx))
{
- push_reload (x, NULL_RTX, &x, NULL,
+ push_reload (x, NULL_RTX, px, NULL,
POINTER_REGS, GET_MODE (x), VOIDmode, 0, 0,
opnum, type);
if (avr_log.legitimize_reload_address)
- avr_edump (" RCLASS = %R\n IN = %r\n OUT = %r\n",
+ avr_edump (" RCLASS.3 = %R\n IN = %r\n OUT = %r\n",
POINTER_REGS, x, NULL_RTX);
return x;
===================================================================
@@ -375,7 +375,7 @@ typedef struct avr_args {
#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_L,WIN) \
do { \
- rtx new_x = avr_legitimize_reload_address (X, MODE, OPNUM, TYPE, \
+ rtx new_x = avr_legitimize_reload_address (&(X), MODE, OPNUM, TYPE, \
ADDR_TYPE (TYPE), \
IND_L, make_memloc); \
if (new_x) \