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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:49813aad3292f7f2bef69206274da78a9a7116ed

commit r11-8226-g49813aad3292f7f2bef69206274da78a9a7116ed
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Apr 16 20:49:33 2021 +0200

    aarch64: Don't emit -Wpsabi note when ABI was never affected [PR91710]

    As the following testcase shows, we emit a -Wpsabi note about argument
    passing change since GCC 9, but in reality the ABI didn't change.
    The alignment is 8 bits in GCC < 9 and 32 bits in GCC >= 9 and
    the aarch64_function_arg_alignment returns in that case:
    return MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY);
    so when both the old and new alignment are smaller or equal to
PARM_BOUNDARY
    (or both are larger than STACK_BOUNDARY, just in theory), even when the new
    one is bigger, it doesn't change the argument passing.

    So, the following patch changes aarch64_function_arg_alignment to tell the
    callers the exact old alignmentm so that they can test it if needed.
    The other aarch64_function_arg_alignment callers either check the
    alignment for equality against 16-byte alignment (when old alignment was
    smaller than that and the new one is 16-byte, we want to emit -Wpsabi
    in all the cases) or the va_arg case which I think is ok now too.

    2021-04-16  Jakub Jelinek  <ja...@redhat.com>

            PR target/91710
            * config/aarch64/aarch64.c (aarch64_function_arg_alignment): Change
            abi_break argument from bool * to unsigned *, store there the
pre-GCC 9
            alignment.
            (aarch64_layout_arg, aarch64_gimplify_va_arg_expr): Adjust callers.
            (aarch64_function_arg_regno_p): Likewise.  Only emit -Wpsabi note
if
            the old and new alignment after applying MIN/MAX to it is
different.

            * gcc.target/aarch64/pr91710.c: New test.

Reply via email to