diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2002-11-05 12:41:52 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2002-11-05 12:41:52 +0000 |
commit | 97ab11755d8d6d19e35bbf0b50e25a543722d8f4 (patch) | |
tree | 33d739e6b29bf5b1987c6e168d7376847f07d4ae | |
parent | f859a1cd556a411be1b96c35be604224980185ce (diff) | |
download | gcc-97ab11755d8d6d19e35bbf0b50e25a543722d8f4.tar.gz |
mips.h (CANNOT_CHANGE_MODE_CLASS): Move comment to...
* config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Move comment to...
* config/mips/mips.c (mips_cannot_change_mode_class): ...here.
From-SVN: r58821
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 17 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 17 |
3 files changed, 21 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0b4cc8e6795..ff854be4332 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-11-05 Richard Sandiford <rsandifo@redhat.com> + + * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Move comment to... + * config/mips/mips.c (mips_cannot_change_mode_class): ...here. + 2002-11-04 Dale Johannesen <dalej@apple.com> * doloop.c (doloop_modify_runtime): Fix loop count computation diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index d58affff1c2..fa326abc928 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -8400,7 +8400,22 @@ function_arg_pass_by_reference (cum, mode, type, named) } /* Return the class of registers for which a mode change from FROM to TO - is invalid. */ + is invalid. + + In little-endian mode, the hi-lo registers are numbered backwards, + so (subreg:SI (reg:DI hi) 0) gets the high word instead of the low + word as intended. + + Similarly, when using paired floating-point registers, the first + register holds the low word, regardless of endianness. So in big + endian mode, (subreg:SI (reg:DF $f0) 0) does not get the high word + as intended. + + Also, loading a 32-bit value into a 64-bit floating-point register + will not sign-extend the value, despite what LOAD_EXTEND_OP says. + We can't allow 64-bit float registers to change from a 32-bit + mode to a 64-bit mode. */ + enum reg_class mips_cannot_change_mode_class (from, to) enum machine_mode from, to; diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index bc37a145e28..3b784c8883d 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2326,23 +2326,6 @@ extern enum reg_class mips_char_to_class[256]; #define CLASS_MAX_NREGS(CLASS, MODE) mips_class_max_nregs (CLASS, MODE) -/* If defined, gives a class of registers that cannot be used as the - operand of a SUBREG that changes the mode of the object illegally. - - In little-endian mode, the hi-lo registers are numbered backwards, - so (subreg:SI (reg:DI hi) 0) gets the high word instead of the low - word as intended. - - Similarly, when using paired floating-point registers, the first - register holds the low word, regardless of endianness. So in big - endian mode, (subreg:SI (reg:DF $f0) 0) does not get the high word - as intended. - - Also, loading a 32-bit value into a 64-bit floating-point register - will not sign-extend the value, despite what LOAD_EXTEND_OP says. - We can't allow 64-bit float registers to change from a 32-bit - mode to a 64-bit mode. */ - #define CANNOT_CHANGE_MODE_CLASS(FROM, TO) \ mips_cannot_change_mode_class (FROM, TO) |