https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112917
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexandre Oliva <aol...@gcc.gnu.org>:

https://gcc.gnu.org/g:4e0a467302fea56d63b7a6d17f99c0f388960dc7

commit r14-6737-g4e0a467302fea56d63b7a6d17f99c0f388960dc7
Author: Alexandre Oliva <ol...@adacore.com>
Date:   Thu Dec 14 04:50:45 2023 -0300

    strub: sparc64: unbias the stack address [PR112917]

    The stack pointer is biased by 2047 bytes on sparc64, so the range it
    delimits is way off.  Unbias the addresses returned by
    __builtin_stack_address (), so that the strub builtins, inlined or
    not, can function correctly.  I've considered introducing a new target
    macro, but using STACK_POINTER_OFFSET seems safe, and it enables the
    register save areas to be scrubbed as well.

    Because of the large fixed-size outgoing args area next to the
    register save area on sparc, we still need __strub_leave to not
    allocate its own frame, otherwise it won't be able to clear part of
    the frame it should.


    for  gcc/ChangeLog

            PR middle-end/112917
            * builtins.cc (expand_bultin_stack_address): Add
            STACK_POINTER_OFFSET.
            * doc/extend.texi (__builtin_stack_address): Adjust.

Reply via email to