aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2020-06-08 09:23:10 +0100
committerTamar Christina <tamar.christina@arm.com>2020-06-08 09:23:10 +0100
commitd6430e3cccb37bec6c5604dffe48c52016509013 (patch)
tree8e482564160f01253b3eb9070d54cb701c481453 /gcc
parent635408da1eb1d441ef4d59fe00a038c920e51085 (diff)
downloadgcc-d6430e3cccb37bec6c5604dffe48c52016509013.zip
gcc-d6430e3cccb37bec6c5604dffe48c52016509013.tar.gz
gcc-d6430e3cccb37bec6c5604dffe48c52016509013.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/aarch64/aarch64.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 97da607..973c65a 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -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));