AArch64: Expand on comment of stack-clash and implicit probing through LR.

This expands the comment on an assert we have in aarch64_layout_frame
and points to an existing comment somewhere else that has a much longer
explanation of what's going on.

Committed under the GCC Obvious rule.

gcc/ChangeLog:

	* config/aarch64/aarch64.c (aarch64_layout_frame): Expand comments.
This commit is contained in:
Tamar Christina 2020-06-08 09:23:10 +01:00
parent 635408da1e
commit d6430e3ccc

View File

@ -6531,7 +6531,9 @@ aarch64_layout_frame (void)
&& !crtl->abi->clobbers_full_reg_p (regno))
frame.reg_offset[regno] = SLOT_REQUIRED;
/* With stack-clash, LR must be saved in non-leaf functions. */
/* With stack-clash, LR must be saved in non-leaf functions. The saving of
LR counts as an implicit probe which allows us to maintain the invariant
described in the comment at expand_prologue. */
gcc_assert (crtl->is_leaf
|| maybe_ne (frame.reg_offset[R30_REGNUM], SLOT_NOT_REQUIRED));