aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/final.c b/gcc/final.c
index 58361ab..c4d4708 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -3089,6 +3089,7 @@ alter_subreg (x)
if (GET_CODE (y) == REG)
{
+ int regno;
/* If the word size is larger than the size of this register,
adjust the register number to compensate. */
/* ??? Note that this just catches stragglers created by/for
@@ -3096,13 +3097,14 @@ alter_subreg (x)
earlier, or kept _all_ subregs until now and eliminate
gen_lowpart and friends. */
- PUT_CODE (x, REG);
#ifdef ALTER_HARD_SUBREG
- REGNO (x) = ALTER_HARD_SUBREG(GET_MODE (x), SUBREG_WORD (x),
- GET_MODE (y), REGNO (y));
+ regno = ALTER_HARD_SUBREG(GET_MODE (x), SUBREG_WORD (x),
+ GET_MODE (y), REGNO (y));
#else
- REGNO (x) = REGNO (y) + SUBREG_WORD (x);
+ regno = REGNO (y) + SUBREG_WORD (x);
#endif
+ PUT_CODE (x, REG);
+ REGNO (x) = regno;
/* This field has a different meaning for REGs and SUBREGs. Make sure
to clear it! */
x->used = 0;