diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-28 12:45:12 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-28 12:45:12 +0000 |
commit | c87f89beaf0954fbb4a81b18b7d239b5745b2a7e (patch) | |
tree | bc291c552c281dfb0144fc1e8d7309894a20c7f1 /gcc/config/sh/sh.h | |
parent | cde587d7b23e1cdf613260c75f3e5d2b3142d7f1 (diff) | |
download | gcc-c87f89beaf0954fbb4a81b18b7d239b5745b2a7e.tar.gz |
* config/sh/sh.h (CLASS_MAX_NREGS): If TARGET_SHMEDIA, and the given
class contains a floating-point register, return the size of the
mode in half words.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61966 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sh/sh.h')
-rw-r--r-- | gcc/config/sh/sh.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 7213933ad36..e5d0677ed60 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -1382,9 +1382,13 @@ extern enum reg_class reg_class_from_letter[]; /* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. - On SH this is the size of MODE in words. */ + If TARGET_SHMEDIA, we need two FP registers per word. + Otherwise we will need at most one register per word. */ #define CLASS_MAX_NREGS(CLASS, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) + (TARGET_SHMEDIA \ + && TEST_HARD_REG_BIT (reg_class_contents[CLASS], FIRST_FP_REG) \ + ? (GET_MODE_SIZE (MODE) + UNITS_PER_WORD/2 - 1) / (UNITS_PER_WORD/2) \ + : (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) /* 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. */ |