diff options
author | Richard Henderson <rth@cygnus.com> | 1998-04-01 17:56:17 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1998-04-01 17:56:17 -0800 |
commit | ce4d78eb2f91ec1b5278a4a23467055089ccc22f (patch) | |
tree | 922ce3c162ba7fe51d2e1c2fb79adbdb13372e37 /gcc/final.c | |
parent | 4901a643933d7005c4745beec0fee58552412b2b (diff) | |
download | gcc-ce4d78eb2f91ec1b5278a4a23467055089ccc22f.zip gcc-ce4d78eb2f91ec1b5278a4a23467055089ccc22f.tar.gz gcc-ce4d78eb2f91ec1b5278a4a23467055089ccc22f.tar.bz2 |
final.c (alter_subreg): Allow the target to hook by-mode subreg hard register number changes.
* final.c (alter_subreg): Allow the target to hook by-mode subreg
hard register number changes.
From-SVN: r18946
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c index 74a6d15..6b851f2 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2891,9 +2891,20 @@ alter_subreg (x) if (GET_CODE (y) == REG) { - /* If the containing reg really gets a hard reg, so do we. */ + /* 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 + integrate. It would be better if we either caught these + 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)); +#else REGNO (x) = REGNO (y) + SUBREG_WORD (x); +#endif } else if (GET_CODE (y) == MEM) { |