aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/mips/mips.h')
-rw-r--r--gcc/config/mips/mips.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index e224ade..494f14c 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2363,8 +2363,14 @@ enum reg_class
#define STACK_GROWS_DOWNWARD 1
-#define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0 \
- || (flag_sanitize & SANITIZE_ADDRESS) != 0)
+/* Growing the frame downwards allows us to put spills closest to
+ the stack pointer which is good as they are likely to be accessed
+ frequently. We can also arrange for normal stack usage to place
+ scalars last so that they too are close to the stack pointer. */
+#define FRAME_GROWS_DOWNWARD ((TARGET_MIPS16 \
+ && TARGET_FRAME_GROWS_DOWNWARDS) \
+ || (flag_stack_protect != 0 \
+ || (flag_sanitize & SANITIZE_ADDRESS) != 0))
/* Size of the area allocated in the frame to save the GP. */