diff options
| author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-23 13:23:04 +0000 |
|---|---|---|
| committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-23 13:23:04 +0000 |
| commit | 318c920fc846d61e76025e3c27f29c4b7b544d76 (patch) | |
| tree | 8ec3fb055335632e906197e39a5c75576c5eec37 | |
| parent | 9ad64b0198dc6cb892243cd0891e9f2d7cd20ef8 (diff) | |
| download | ppe42-gcc-318c920fc846d61e76025e3c27f29c4b7b544d76.tar.gz ppe42-gcc-318c920fc846d61e76025e3c27f29c4b7b544d76.zip | |
* emit-rtl.c (gen_lowpart_common): Use word 0 if register mode
is narrower than requested mode.
(gen_highpart): Abort if register mode is narrower than
requested mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37696 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/emit-rtl.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6721de104f3..8263d94cda5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2000-11-23 Alexandre Oliva <aoliva@redhat.com> + + * emit-rtl.c (gen_lowpart_common): Use word 0 if register mode + is narrower than requested mode. + (gen_highpart): Abort if register mode is narrower than + requested mode. + 2000-11-23 Graham Stott <grahams@redhat.com> * cse.c (cse_insn): Initialise all regcost variables. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index db1c73fc936..4329346260a 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -709,7 +709,8 @@ gen_lowpart_common (mode, x) regs are sized by the underlying register size. Better would be to always interpret the subreg offset parameter as bytes or bits. */ - if (WORDS_BIG_ENDIAN && REGNO (x) < FIRST_PSEUDO_REGISTER) + if (WORDS_BIG_ENDIAN && REGNO (x) < FIRST_PSEUDO_REGISTER + && GET_MODE_SIZE (GET_MODE (x)) > GET_MODE_SIZE (mode)) word = (HARD_REGNO_NREGS (REGNO (x), GET_MODE (x)) - HARD_REGNO_NREGS (REGNO (x), mode)); @@ -1141,7 +1142,9 @@ gen_highpart (mode, x) regs are sized by the underlying register size. Better would be to always interpret the subreg offset parameter as bytes or bits. */ - if (WORDS_BIG_ENDIAN) + if (GET_MODE_SIZE (GET_MODE (x)) < GET_MODE_SIZE (mode)) + abort (); + else if (WORDS_BIG_ENDIAN) word = 0; else if (REGNO (x) < FIRST_PSEUDO_REGISTER) word = (HARD_REGNO_NREGS (REGNO (x), GET_MODE (x)) |

