diff options
Diffstat (limited to 'gcc/config/cris')
-rw-r--r-- | gcc/config/cris/cris.c | 16 | ||||
-rw-r--r-- | gcc/config/cris/cris.h | 8 |
2 files changed, 16 insertions, 8 deletions
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 0180638..1b2add0 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -163,6 +163,7 @@ static rtx cris_function_value(const_tree, const_tree, bool); static rtx cris_libcall_value (machine_mode, const_rtx); static bool cris_function_value_regno_p (const unsigned int); static void cris_file_end (void); +static unsigned int cris_hard_regno_nregs (unsigned int, machine_mode); static bool cris_hard_regno_mode_ok (unsigned int, machine_mode); /* This is the parsed result of the "-max-stack-stackframe=" option. If @@ -281,6 +282,8 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION; #undef TARGET_FUNCTION_VALUE_REGNO_P #define TARGET_FUNCTION_VALUE_REGNO_P cris_function_value_regno_p +#undef TARGET_HARD_REGNO_NREGS +#define TARGET_HARD_REGNO_NREGS cris_hard_regno_nregs #undef TARGET_HARD_REGNO_MODE_OK #define TARGET_HARD_REGNO_MODE_OK cris_hard_regno_mode_ok @@ -4296,6 +4299,19 @@ cris_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) sake of a trampoline. */ } +/* Implement TARGET_HARD_REGNO_NREGS. + + The VOIDmode test is so we can omit mode on anonymous insns. FIXME: + Still needed in 2.9x, at least for Axis-20000319. */ + +static unsigned int +cris_hard_regno_nregs (unsigned int, machine_mode mode) +{ + if (mode == VOIDmode) + return 1; + return CEIL (GET_MODE_SIZE (mode), UNITS_PER_WORD); +} + /* Implement TARGET_HARD_REGNO_MODE_OK. CRIS permits all registers to hold all modes. Well, except for the diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h index cbf21ea..4b332a9 100644 --- a/gcc/config/cris/cris.h +++ b/gcc/config/cris/cris.h @@ -469,14 +469,6 @@ extern int cris_cpu_version; {15, 9, 13, 12, 11, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 16, 14, 18, 19} -/* Node: Values in Registers */ - -/* The VOIDmode test is so we can omit mode on anonymous insns. FIXME: - Still needed in 2.9x, at least for Axis-20000319. */ -#define HARD_REGNO_NREGS(REGNO, MODE) \ - (MODE == VOIDmode \ - ? 1 : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) - /* Node: Leaf Functions */ /* (no definitions) */ |