[Bug target/102143] ABI incompatibility with clang when passing 32bit vectors on 32bit i686
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 1 07:32:44 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102143
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, we already have the ABI ISA dependent,
typedef int __v8si __attribute__((__vector_size__ (32)));
__v8si
foo (__v8si x, __v8si y)
{
return x + y;
}
has different ABI based on -mavx or -mno-avx, etc. For -mno-avx we emit a
warning:
/tmp/test.c: In function ‘foo’:
/tmp/test.c:5:1: warning: AVX vector return without AVX enabled changes the ABI
[-Wpsabi]
5 | {
| ^
/tmp/test.c:4:1: note: the ABI for passing parameters with 32-byte alignment
has changed in GCC 4.6
4 | foo (__v8si x, __v8si y)
| ^~~
/tmp/test.c:4:1: warning: AVX vector argument without AVX enabled changes the
ABI [-Wpsabi]
So, depending on what we decide, if the ABI will be ISA dependent, we want a
warning like the above one.
More information about the Gcc-bugs
mailing list