http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50091

--- Comment #13 from Iain Sandoe <iains at gcc dot gnu.org> 2011-09-04 11:18:23 
UTC ---
(In reply to comment #12)
> > bootstrapped with your amended change to rs6000.c
> > ./gcc/xgcc -Bgcc ../tests/hello.c -o hc -fstack-check -save-temps 
> > -fverbose-asm
> > -fdump-rtl-all
> > ... shows that the stack check is present and correct ... 
> > any idea what test would produce the stack range check?
> 
> You'd need to define STACK_CHECK_STATIC_BUILTIN to 1 for PowerPC/Darwin and
> have a large frame.

re-bootstrapped (less Ada and Java) with that ...

... checked manually with a cooked-up testcase that we get:
(insn 683 682 684 (set (reg:SI 12 r12)
        (unspec_volatile:SI [
                (reg:SI 12 r12)
                (reg:SI 0 r0)
            ] UNSPECV_PROBE_STACK_RANGE)) ../test-ppc/limit-struct.c:21 441
{probe_stack_rangesi}
     (nil))

for a large frame ... and:

(insn 30 4 31 (set (mem/v:SI (plus:SI (reg/f:SI 1 r1)
                (const_int -12368 [0xffffffffffffcfb0])) [0 S4 A8])
        (unspec [
                (const_int 0 [0])
            ] UNSPEC_PROBE_STACK)) ../test-ppc/limit-struct.c:93 440
{probe_stack}
     (nil))

for a smaller frame ...
... and the asm looks sensible...

... running check again ... but I'd hazard that this is fairly safe (at least,
from the darwin perspective).   However, I'm not able to check ppc linux here, 
as things stand.

Reply via email to