public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub.kulik at oracle dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114416] calling convention incompatibility with vendor compiler for V9 Date: Wed, 17 Apr 2024 14:06:35 +0000 [thread overview] Message-ID: <bug-114416-4-f03a1tbhFf@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114416-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114416 --- Comment #10 from Jakub Kulik <jakub.kulik at oracle dot com> --- Sorry for longer response. I asked internally again and was told by a colleague who was in the room when the spec was created, that: "the intent was (and is) that the individual elements/atoms/fundamental types that make up a small structure, no matter how those elements/atoms/fundamental types are aggregated within the structure, are passed in registers appropriate for the fundamental type in question. (That is, pointers and integral types are passed in the %o registers, and floating point types are passed in the floating-point registers.) So a structure that contains an array of two floats is treated the same as a structure that contains two floats." That said, he agreed that the spec could perhaps be better written. He also added: Page 3P-11 says this, under "Function Argument Passing": "It is convenient to describe parameter linkage in terms of an array. Conceptually, parameters are assigned into an array of extended words, left-to-right, with an occasional “hole” to satisfy alignment restrictions. Typically, most parameter values will be “promoted” from their memory locations into registers, and most calls are expected to execute this way with less overhead." There is then a diagram that shows the correspondence between parameter registers and the parameter array. On page 3P-12, under "Structure and Union arguments", it says this: "Structure or union types up to eight bytes in size are assigned to one parameter array word, and align to eight-byte boundaries. "Structure or union types larger than eight bytes, and up to sixteen bytes in size are assigned to two consecutive parameter array words, and align according to the alignment requirements of the structure or at least to an eight-byte boundary." So perhaps instead of saying "The individual fields of a structure ... are subject to promotion into registers based on their type using the same rules as apply to scalar values" the spec should have said "The individual parameter array words assigned to a structure ... are subject to promotion into registers based on their type using the same rules as apply to scalar values."
next prev parent reply other threads:[~2024-04-17 14:06 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-21 13:00 [Bug target/114416] New: SPARC V9 struct return with floating-point members violates ABI ro at gcc dot gnu.org 2024-03-21 13:00 ` [Bug target/114416] " ro at gcc dot gnu.org 2024-03-21 13:01 ` ro at gcc dot gnu.org 2024-03-21 14:54 ` ebotcazou at gcc dot gnu.org 2024-03-21 15:08 ` ro at CeBiTec dot Uni-Bielefeld.DE 2024-03-24 10:42 ` ebotcazou at gcc dot gnu.org 2024-03-25 9:02 ` [Bug target/114416] calling convention incompatibility with vendor compiler for V9 ebotcazou at gcc dot gnu.org 2024-03-27 9:49 ` jakub.kulik at oracle dot com 2024-03-27 9:56 ` jakub.kulik at oracle dot com 2024-03-27 10:13 ` ebotcazou at gcc dot gnu.org 2024-03-27 10:16 ` ebotcazou at gcc dot gnu.org 2024-04-17 14:06 ` jakub.kulik at oracle dot com [this message] 2024-04-17 14:08 ` jakub.kulik at oracle dot com 2024-04-23 8:31 ` ebotcazou at gcc dot gnu.org 2024-04-23 11:34 ` ro at CeBiTec dot Uni-Bielefeld.DE 2024-04-24 7:26 ` ebotcazou at gcc dot gnu.org 2024-04-24 7:31 ` ro at CeBiTec dot Uni-Bielefeld.DE 2024-04-24 12:17 ` ro at CeBiTec dot Uni-Bielefeld.DE 2024-04-24 12:29 ` ebotcazou at gcc dot gnu.org 2024-04-24 12:34 ` ro at CeBiTec dot Uni-Bielefeld.DE 2024-04-25 9:29 ` ro at CeBiTec dot Uni-Bielefeld.DE 2024-04-25 10:48 ` cvs-commit at gcc dot gnu.org 2024-04-25 10:56 ` ebotcazou at gcc dot gnu.org 2024-04-25 11:01 ` jakub.kulik at oracle dot com
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-114416-4-f03a1tbhFf@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).