Fix problem in final.c:alter_subreg
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Tue Nov 13 15:03:00 GMT 2001
This causes testsuite failures on Alpha.
Thu Nov 15 08:36:39 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* final.c (alter_subreg): If simplify_subreg can't do anything,
handle REG ourselves and abort for others.
*** final.c 2001/11/14 13:51:09 1.221
--- final.c 2001/11/15 14:48:57
*************** alter_subreg (xp)
*** 3039,3043 ****
*xp = adjust_address (y, GET_MODE (x), SUBREG_BYTE (x));
else
! *xp = simplify_subreg (GET_MODE (x), y, GET_MODE (y), SUBREG_BYTE (x));
return *xp;
}
--- 3039,3062 ----
*xp = adjust_address (y, GET_MODE (x), SUBREG_BYTE (x));
else
! {
! rtx new = simplify_subreg (GET_MODE (x), y, GET_MODE (y),
! SUBREG_BYTE (x));
!
! if (new != 0)
! *xp = new;
! /* Simplify_subreg can't handle some REG cases, but we have to. */
! else if (GET_CODE (y) == REG)
! {
! REGNO (x) = subreg_hard_regno (x, 1);
! PUT_CODE (x, REG);
! ORIGINAL_REGNO (x) = ORIGINAL_REGNO (y);
! /* This field has a different meaning for REGs and SUBREGs. Make
! sure to clear it! */
! x->used = 0;
! }
! else
! abort ();
! }
!
return *xp;
}
More information about the Gcc-patches
mailing list