aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/c4x/c4x.h
diff options
context:
space:
mode:
authorHerman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>2001-04-07 03:17:57 +0200
committerMichael Hayes <m.hayes@gcc.gnu.org>2001-04-07 01:17:57 +0000
commitd0550d07e2537457f326eba11422c5d9df740637 (patch)
treeda9e6273bcf9eca6864e66f4898aa1b084c605c6 /gcc/config/c4x/c4x.h
parentc8cd06a8137b153b373c16a2d681aaca2c423425 (diff)
downloadgcc-d0550d07e2537457f326eba11422c5d9df740637.zip
gcc-d0550d07e2537457f326eba11422c5d9df740637.tar.gz
gcc-d0550d07e2537457f326eba11422c5d9df740637.tar.bz2
c4x.h (HARD_REGNO_NREGS): HCmode mode uses 2 regs not 4.
2001-04-07 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> * c4x.h (HARD_REGNO_NREGS): HCmode mode uses 2 regs not 4. From-SVN: r41173
Diffstat (limited to 'gcc/config/c4x/c4x.h')
-rw-r--r--gcc/config/c4x/c4x.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index 7215565..3f351e3 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -630,12 +630,16 @@ extern const char *c4x_rpts_cycles_string, *c4x_cpu_version_string;
#define CLASS_LIKELY_SPILLED_P(CLASS) ((CLASS) == INDEX_REGS)
-/* CCmode is wrongly defined in machmode.def It should have a size
- of UNITS_PER_WORD. */
+/* CCmode is wrongly defined in machmode.def. It should have a size
+ of UNITS_PER_WORD. HFmode is 40-bits and thus fits within a single
+ extended precision register. Similarly, HCmode fits within two
+ extended precision registers. */
#define HARD_REGNO_NREGS(REGNO, MODE) \
-(((MODE) == CCmode || (MODE) == CC_NOOVmode) ? 1 : ((MODE) == HFmode) ? 1 : \
-((GET_MODE_SIZE(MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
+(((MODE) == CCmode || (MODE) == CC_NOOVmode) ? 1 : \
+ ((MODE) == HFmode) ? 1 : \
+ ((MODE) == HCmode) ? 2 : \
+ ((GET_MODE_SIZE(MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
/* A C expression that is nonzero if the hard register REGNO is preserved