aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-03-05 19:17:12 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-03-05 19:17:12 -0500
commit64609742de886744acea45f6f00589b4a055eb2b (patch)
tree923e2f92d56be7a9c72c90eb68cc7cf6ba69e7ad /gcc/reload.c
parent269673180b079297b9ff6bdc3307347897de737f (diff)
downloadgcc-64609742de886744acea45f6f00589b4a055eb2b.zip
gcc-64609742de886744acea45f6f00589b4a055eb2b.tar.gz
gcc-64609742de886744acea45f6f00589b4a055eb2b.tar.bz2
(get_secondary_mem): Call SECONDARY_MEMORY_NEEDED_MODE if it is
defined. From-SVN: r6697
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 37d3dd8..690a7ec 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -602,14 +602,17 @@ get_secondary_mem (x, mode, opnum, type)
rtx loc;
int mem_valid;
- /* If MODE is narrower than a word, widen it. This is required because
- most machines that require these memory locations do not support
- short load and stores from all registers (e.g., FP registers). We could
- possibly conditionalize this, but we lose nothing by doing the wider
- mode. */
+ /* By default, if MODE is narrower than a word, widen it to a word.
+ This is required because most machines that require these memory
+ locations do not support short load and stores from all registers
+ (e.g., FP registers). */
+#ifdef SECONDARY_MEMORY_NEEDED_MODE
+ mode = SECONDARY_MEMORY_NEEDED_MODE (mode);
+#else
if (GET_MODE_BITSIZE (mode) < BITS_PER_WORD)
mode = mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (mode), 0);
+#endif
/* If we already have made a MEM for this operand in MODE, return it. */
if (secondary_memlocs_elim[(int) mode][opnum] != 0)