This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ARM] Fix PR middle-end/65958
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ramana Radhakrishnan <ramana dot radhakrishnan at foss dot arm dot com>
- Date: Wed, 07 Oct 2015 11:09:23 +0200
- Subject: Re: [ARM] Fix PR middle-end/65958
- Authentication-results: sourceware.org; auth=none
- References: <1478566 dot ZKXszbaoG4 at polaris> <9319219 dot YanzbaT3s8 at polaris> <5614D48B dot 8000502 at gmail dot com>
> I assume that this patch (and arm patch) will change the instruction
> sequences in prologue. If so, do you have some examples about how
> prologue is changed with this patch? I need to adapt GDB prologue
> analyser to these new instruction sequences.
Yes, it will generate either individual probes or a probing loop before the
frame is established when -fstack-check is passed. For aarch64, a probe is a
store based on x9 of the form:
str xzr, [x9, #offset]
with preceding instructions to compute x9 from sp, typically:
sub x9, sp, #16384
A probing loop uses both x9 and x10:
sub x9, sp, #12288
sub x10, sp, #36864
LPSRL0:
sub x9, x9, 4096
str xzr, [x9]
cmp x9, x10
b.ne LPSRL0
with an optional last probe:
str xzr, [x10,#-16]
For arm, it's more convoluted because the base register may vary but, in
simple cases (in particular if the function is not nested), it's IP:
str r0, [ip, #offset]
--
Eric Botcazou