summaryrefslogtreecommitdiff
path: root/gcc/targhooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r--gcc/targhooks.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index f69b39626a6..16d0b189f65 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1309,6 +1309,19 @@ default_class_likely_spilled_p (reg_class_t rclass)
return (reg_class_size[(int) rclass] == 1);
}
+/* The default implementation of TARGET_CLASS_MAX_NREGS. */
+
+unsigned char
+default_class_max_nregs (reg_class_t rclass ATTRIBUTE_UNUSED,
+ enum machine_mode mode ATTRIBUTE_UNUSED)
+{
+#ifdef CLASS_MAX_NREGS
+ return (unsigned char) CLASS_MAX_NREGS ((enum reg_class) rclass, mode);
+#else
+ return ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD);
+#endif
+}
+
/* Determine the debugging unwind mechanism for the target. */
enum unwind_info_type