diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-04-16 20:49:33 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-04-16 20:49:33 +0200 |
commit | 49813aad3292f7f2bef69206274da78a9a7116ed (patch) | |
tree | a539db71a7c6c3444101ad4372dd2a48f6788f0d /gcc/fortran/trans-array.c | |
parent | 4a1493f0603262a7dc1114d9827353e9810e63dc (diff) | |
download | gcc-49813aad3292f7f2bef69206274da78a9a7116ed.zip gcc-49813aad3292f7f2bef69206274da78a9a7116ed.tar.gz gcc-49813aad3292f7f2bef69206274da78a9a7116ed.tar.bz2 |
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 <jakub@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.
Diffstat (limited to 'gcc/fortran/trans-array.c')
0 files changed, 0 insertions, 0 deletions