Since stack clash depends on the LR being saved for non-leaf functions this
patch adds an assert such that if this changes we would notice this.
gcc/
PR target/86486
* config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
From-SVN: r264748
+2018-10-01 Tamar Christina <tamar.christina@arm.com>
+
+ PR target/86486
+ * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
+
2018-10-01 Jeff Law <law@redhat.com>
Richard Sandiford <richard.sandiford@linaro.org>
Tamar Christina <tamar.christina@arm.com>
offset = 2 * UNITS_PER_WORD;
}
+ /* With stack-clash, LR must be saved in non-leaf functions. */
+ gcc_assert (crtl->is_leaf
+ || (cfun->machine->frame.reg_offset[R30_REGNUM]
+ != SLOT_NOT_REQUIRED));
+
/* Now assign stack slots for them. */
for (regno = R0_REGNUM; regno <= R30_REGNUM; regno++)
if (cfun->machine->frame.reg_offset[regno] == SLOT_REQUIRED)