[Bug target/102105] x86_64: ABI break with vector in union and -mno-mmx -mavx
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Aug 28 01:09:59 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102105
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unknown |9.4.1
Summary|[10/11/12 Regression] |x86_64: ABI break with
|x86_64: ABI break with |vector in union and
|vector in union and |-mno-mmx -mavx
|-mno-mmx -mavx |
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
I consider this is a GCC 9 bug:
[hjl@gnu-cfl-2 pr102105]$ cat foo.c
extern __attribute__((__vector_size__(8))) long long g_v1di;
void pass_v1di( __attribute__((__vector_size__(8))) long long);
void test_v1di() { pass_v1di(g_v1di); }
[hjl@gnu-cfl-2 pr102105]$ /usr/gcc-9.3.1-x32/bin/gcc -S -O2 foo.c
[hjl@gnu-cfl-2 pr102105]$ cat foo.s
.file "foo.c"
.text
.p2align 4
.globl test_v1di
.type test_v1di, @function
test_v1di:
.LFB0:
.cfi_startproc
movq g_v1di(%rip), %xmm0
jmp pass_v1di
.cfi_endproc
.LFE0:
.size test_v1di, .-test_v1di
.ident "GCC: (GNU) 9.3.1 20200312"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-cfl-2 pr102105]$ /usr/gcc-9.3.1-x32/bin/gcc -S -O2 foo.c -mno-mmx
[hjl@gnu-cfl-2 pr102105]$ cat foo.s
.file "foo.c"
.text
.p2align 4
.globl test_v1di
.type test_v1di, @function
test_v1di:
.LFB0:
.cfi_startproc
movq g_v1di(%rip), %rdi
jmp pass_v1di
.cfi_endproc
.LFE0:
.size test_v1di, .-test_v1di
.ident "GCC: (GNU) 9.3.1 20200312"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-cfl-2 pr102105]$
Since MMX register isn't used, -mno-mmx shouldn't change ABI.
More information about the Gcc-bugs
mailing list