aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/lm32/lm32.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/lm32/lm32.c')
-rw-r--r--gcc/config/lm32/lm32.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/config/lm32/lm32.c b/gcc/config/lm32/lm32.c
index 214cc0a..536944f 100644
--- a/gcc/config/lm32/lm32.c
+++ b/gcc/config/lm32/lm32.c
@@ -77,6 +77,7 @@ static rtx lm32_function_arg (cumulative_args_t cum,
static void lm32_function_arg_advance (cumulative_args_t cum,
machine_mode mode,
const_tree type, bool named);
+static bool lm32_hard_regno_mode_ok (unsigned int, machine_mode);
#undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE lm32_option_override
@@ -106,6 +107,8 @@ static void lm32_function_arg_advance (cumulative_args_t cum,
#define TARGET_LRA_P hook_bool_void_false
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P lm32_legitimate_address_p
+#undef TARGET_HARD_REGNO_MODE_OK
+#define TARGET_HARD_REGNO_MODE_OK lm32_hard_regno_mode_ok
struct gcc_target targetm = TARGET_INITIALIZER;
@@ -1221,3 +1224,11 @@ lm32_move_ok (machine_mode mode, rtx operands[2]) {
return register_or_zero_operand (operands[1], mode);
return true;
}
+
+/* Implement TARGET_HARD_REGNO_MODE_OK. */
+
+static bool
+lm32_hard_regno_mode_ok (unsigned int regno, machine_mode)
+{
+ return G_REG_P (regno);
+}