public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/102197] New: ABI to pass and return 32-bit FP vectors
@ 2021-09-03 20:16 hjl.tools at gmail dot com
0 siblings, 0 replies; only message in thread
From: hjl.tools at gmail dot com @ 2021-09-03 20:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102197
Bug ID: 102197
Summary: ABI to pass and return 32-bit FP vectors
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
CC: crazylht at gmail dot com, ubizjak at gmail dot com
Target Milestone: ---
Target: x86-64
[hjl@gnu-cfl-2 pr102143]$ cat v1sf.c
typedef float __v1sf __attribute__ ((__vector_size__ (4)));
struct s1sf
{
float f;
};
extern __v1sf v1sf;
extern struct s1sf s1sf;
extern void foo1 (__v1sf);
extern void bar1 (struct s1sf);
__v1sf
foo2 (void)
{
foo1 (v1sf);
return v1sf;
}
struct s1sf
bar2 (void)
{
bar1 (s1sf);
return s1sf;
}
[hjl@gnu-cfl-2 pr102143]$ make v1sf.s
/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/ -O2 -S
v1sf.c
[hjl@gnu-cfl-2 pr102143]$ cat v1sf.s
.file "v1sf.c"
.text
.p2align 4
.globl foo2
.type foo2, @function
foo2:
.LFB0:
.cfi_startproc
pushq %r12
.cfi_def_cfa_offset 16
.cfi_offset 12, -16
movq %rdi, %r12
subq $32, %rsp
.cfi_def_cfa_offset 48
movl v1sf(%rip), %eax
movl %eax, (%rsp)
call foo1
movl v1sf(%rip), %eax
movl %eax, (%r12)
addq $32, %rsp
.cfi_def_cfa_offset 16
movq %r12, %rax
popq %r12
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE0:
.size foo2, .-foo2
.p2align 4
.globl bar2
.type bar2, @function
bar2:
.LFB1:
.cfi_startproc
subq $8, %rsp
.cfi_def_cfa_offset 16
movss s1sf(%rip), %xmm0
call bar1
movss s1sf(%rip), %xmm0
addq $8, %rsp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE1:
.size bar2, .-bar2
.ident "GCC: (GNU) 12.0.0 20210902 (experimental)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-cfl-2 pr102143]$
Should __v1sf be passed and returned like struct s1sf?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-03 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03 20:16 [Bug target/102197] New: ABI to pass and return 32-bit FP vectors hjl.tools at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).