https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109780

--- Comment #38 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Sam James from comment #29)
> $ gcc-14 p.c -o p -O2 -march=znver1 -fno-stack-protector
> -fno-stack-clash-protection && ./p
> Segmentation fault (core dumped)

Adding -mpreferred-stack-boundary=3 (as expected) "fixes" the testcase. The
difference of "g" is in the realignment AND insn:

        vmovdqa %xmm1, %xmm0
        .cfi_offset 3, -24
        movl    $1, %ebx
-       leaq    -48(%rsp), %rdx
+       andq    $-16, %rsp
        movl    $9, %r11d
+       leaq    -48(%rsp), %rdx
        movq    d(%rip), %rcx
        jmp     .L7

Reply via email to