public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102197] New: ABI to pass and return 32-bit FP vectors Date: Fri, 03 Sep 2021 20:16:35 +0000 [thread overview] Message-ID: <bug-102197-4@http.gcc.gnu.org/bugzilla/> (raw) 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?
reply other threads:[~2021-09-03 20:16 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-102197-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).