stack-clash: Add LR assert to layout_frame.
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
This commit is contained in:
parent
cd1bef27d2
commit
db6b62a858
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
@ -4094,6 +4094,11 @@ aarch64_layout_frame (void)
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user