+ frame.sve_callee_adjust
+ frame.final_adjust, frame.frame_size));
+ if (!frame.emit_frame_chain && frame.callee_adjust == 0)
+ {
+ /* We've decided not to associate any register saves with the initial
+ stack allocation. */
+ frame.wb_candidate1 = INVALID_REGNUM;
+ frame.wb_candidate2 = INVALID_REGNUM;
+ }
+
frame.laid_out = true;
}
/* Store FP,LR and setup a frame pointer. */
bool emit_frame_chain;
+ /* In each frame, we can associate up to two register saves with the
+ initial stack allocation. This happens in one of two ways:
+
+ (1) Using an STR or STP with writeback to perform the initial
+ stack allocation. When EMIT_FRAME_CHAIN, the registers will
+ be those needed to create a frame chain.
+
+ Indicated by CALLEE_ADJUST != 0.
+
+ (2) Using a separate STP to set up the frame record, after the
+ initial stack allocation but before setting up the frame pointer.
+ This is used if the offset is too large to use writeback.
+
+ Indicated by CALLEE_ADJUST == 0 && EMIT_FRAME_CHAIN.
+
+ These fields indicate which registers we've decided to handle using
+ (1) or (2), or INVALID_REGNUM if none. */
unsigned wb_candidate1;
unsigned wb_candidate2;
--- /dev/null
+/* { dg-do compile { target { aarch64*-*-* } } } */
+/* { dg-options "-O2" } */
+/* { dg-final { check-function-bodies "**" "" } } */
+
+/*
+** foo:
+** ...
+** str d8, \[sp\]
+** ldr d8, \[sp\]
+** ...
+*/
+void
+foo (int x)
+{
+ int tmp[0x1000];
+ asm volatile ("" : "=m" (tmp));
+ if (x == 1)
+ asm volatile ("" ::: "d8");
+}