diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-23 23:03:15 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-23 23:03:15 +0000 |
commit | df9a397c08d6a08316bc1dd815291f4159edc87a (patch) | |
tree | d1a76f18f5ec7676024c59484c69a8c80a10e55b /gcc/simplify-rtx.c | |
parent | f4e1623043decd25fbe99d994c385b02eb52dc3a (diff) | |
download | gcc-df9a397c08d6a08316bc1dd815291f4159edc87a.tar.gz |
* simplify-rtx.c (simplify_subreg): Use subreg_regno_offset directly
instead of using a SUBREG temporary.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91114 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index ac896ab27ab..8ecd8fc5528 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -3675,14 +3675,15 @@ simplify_subreg (enum machine_mode outermode, rtx op, && subreg_offset_representable_p (REGNO (op), innermode, byte, outermode)) { - rtx tem = gen_rtx_SUBREG (outermode, op, byte); - int final_regno = subreg_hard_regno (tem, 0); + unsigned int regno = REGNO (op); + unsigned int final_regno + = regno + subreg_regno_offset (regno, innermode, byte, outermode); /* ??? We do allow it if the current REG is not valid for its mode. This is a kludge to work around how float/complex arguments are passed on 32-bit SPARC and should be fixed. */ if (HARD_REGNO_MODE_OK (final_regno, outermode) - || ! HARD_REGNO_MODE_OK (REGNO (op), innermode)) + || ! HARD_REGNO_MODE_OK (regno, innermode)) { rtx x = gen_rtx_REG_offset (op, outermode, final_regno, byte); |