]> gcc.gnu.org Git - gcc.git/commitdiff
(SECONDARY_MEMORY_NEEDED_RTX): Call assign_stack_local
authorJim Wilson <wilson@gcc.gnu.org>
Fri, 8 Jul 1994 20:52:11 +0000 (13:52 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 8 Jul 1994 20:52:11 +0000 (13:52 -0700)
if the frame has zero size.

From-SVN: r7682

gcc/config/sparc/sparc.h

index c9339c2cef99f930a0c33daeab8fd7d5b9270cbc..1fb1bf07107f7829c27cccb3092ce9eee035678c 100644 (file)
@@ -1072,10 +1072,15 @@ extern char leaf_reg_remap[];
    GENERAL_REGS and FP_REGS.  */
 #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) ((CLASS1) != (CLASS2))
 
-/* Return the stack location to use for secondary memory needed reloads.  */
+/* Return the stack location to use for secondary memory needed reloads.
+   We want to use the reserved location just below the frame pointer.
+   However, we must ensure that there is a frame, so use assign_stack_local
+   if the frame size is zero.  */
 #define SECONDARY_MEMORY_NEEDED_RTX(MODE) \
-  gen_rtx (MEM, MODE, gen_rtx (PLUS, Pmode, frame_pointer_rtx, \
-          GEN_INT (STARTING_FRAME_OFFSET)))
+  (get_frame_size () == 0                                              \
+   ? assign_stack_local (mode, GET_MODE_SIZE (mode), 0)                        \
+   : gen_rtx (MEM, MODE, gen_rtx (PLUS, Pmode, frame_pointer_rtx,      \
+                                 GEN_INT (STARTING_FRAME_OFFSET))))
 
 /* Get_secondary_mem widens it's argument to BITS_PER_WORD which loses on v9
    because the movsi and movsf patterns don't handle r/f moves.
This page took 0.068053 seconds and 5 git commands to generate.