aboutsummaryrefslogtreecommitdiff
path: root/gcc/targhooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r--gcc/targhooks.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index d2b7082..98e553c 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1129,6 +1129,18 @@ default_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
return rclass;
}
+/* The default implementation of TARGET_SECONDARY_MEMORY_NEEDED_MODE. */
+
+machine_mode
+default_secondary_memory_needed_mode (machine_mode mode)
+{
+ if (!targetm.lra_p ()
+ && GET_MODE_BITSIZE (mode) < BITS_PER_WORD
+ && INTEGRAL_MODE_P (mode))
+ return mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (mode), 0).require ();
+ return mode;
+}
+
/* By default, if flag_pic is true, then neither local nor global relocs
should be placed in readonly memory. */