public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "ulrich.weigand at de dot ibm.com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug tdep/29247] [gdb, tdep] ../../gdb/ppc-sysv-tdep.c:1945: internal-error: ppc64_sysv_abi_return_value: Assertion `ok' failed Date: Sat, 25 Jun 2022 02:51:16 +0000 [thread overview] Message-ID: <bug-29247-4717-deCo9NqU9s@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29247-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29247 --- Comment #17 from ulrich.weigand at de dot ibm.com --- (In reply to Carl E Love from comment #16) > Created attachment 14167 [details] > + /* IBM long double uses floating point registers for the 128-bit value. > */ > + if ((type->code () == TYPE_CODE_FLT > + && !(gdbarch_long_double_format (gdbarch) This ^ > + == floatformats_ieee_quad) && TYPE_LENGTH (type) == 16) ends here ^ > || type->code () == TYPE_CODE_DECFLOAT) making the whole thing equivalent to if ((type->code () == TYPE_CODE_FLT && gdbarch_long_double_format (gdbarch) != floatformats_ieee_quad && TYPE_LENGTH (type) == 16) || type->code () == TYPE_CODE_DECFLOAT) so it will no longer be used at all for binary floating-point types of lengths other than 16 bytes. > I was trying to make sure that the IEEE 128-bit case would be excluded. I > think it was only taking that one case out. No, it wasn't. > But, it is hard to read. I > rewrote it to make it easier to read. By checking for the IEEE FLOAT > 128-bit case first, then TYPE_CODE_FLT you don't need to modify the existing > "if (type->code () == TYPE_CODE_FLT" statement. Sure. It seems to me that these changes, in combination with the homogeneous struct changes below, are quite complicated and introduce a lot of code duplication. Maybe it would be preferable to handle this case just once, *in* ppc64_sysv_abi_push_freg, instead of updating all its callers. > I also found I had missed handling a float case. I fixed that it reduced > the number of errors from 72 to 12. I am not sure about the check for > aggregate candidate and homogeneous aggregate. Not sure yet what a > homogeneous float/vector is and if I need to do something special to check > for them in the case of the IEEE FLOAT 128-bit case? Homogeneous structs are structures where all elements have the same type, and that same type is a float or vector type. Those structs are passed as if the members were passed on their own. E.g. an element of type struct { long double x; long double y; } is passed exactly as if it were two arguments of "long double" type each. Therefore, this also does have to take IEEE vs. IBM float 128-bit into account. The ELFv1 ABI did not support that generic homogenous struct case, but still handled *single-element* structures likewise. > Attached latest patch. It has a comments indicating the new code. There are more problems with wrong grouping, this time with '{' nesting in the code added to ppc_sysv_abi_push_dummy_call. Just copy (or even better, restructure the if clauses to re-use) the vector case. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-06-25 2:51 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-14 8:58 [Bug tdep/29247] New: " vries at gcc dot gnu.org 2022-06-14 14:51 ` [Bug tdep/29247] " vries at gcc dot gnu.org 2022-06-15 11:59 ` vries at gcc dot gnu.org 2022-06-15 13:27 ` vries at gcc dot gnu.org 2022-06-15 14:47 ` vries at gcc dot gnu.org 2022-06-15 14:51 ` vries at gcc dot gnu.org 2022-06-15 15:49 ` vries at gcc dot gnu.org 2022-06-15 15:59 ` vries at gcc dot gnu.org 2022-06-15 22:47 ` vries at gcc dot gnu.org 2022-06-16 13:53 ` jamborm at gcc dot gnu.org 2022-06-20 12:25 ` ulrich.weigand at de dot ibm.com 2022-06-21 16:32 ` cel at us dot ibm.com 2022-06-23 15:19 ` cel at us dot ibm.com 2022-06-23 15:22 ` cel at us dot ibm.com 2022-06-23 15:30 ` ulrich.weigand at de dot ibm.com 2022-06-23 19:56 ` cel at us dot ibm.com 2022-06-24 0:53 ` cel at us dot ibm.com 2022-06-24 11:53 ` ulrich.weigand at de dot ibm.com 2022-06-25 0:42 ` cel at us dot ibm.com 2022-06-25 2:51 ` ulrich.weigand at de dot ibm.com [this message] 2022-06-30 22:47 ` cel at us dot ibm.com 2022-07-12 9:15 ` ulrich.weigand at de dot ibm.com 2022-07-13 17:46 ` cel at us dot ibm.com 2022-07-15 15:32 ` cel at us dot ibm.com 2022-07-15 16:09 ` cel at us dot ibm.com 2022-07-27 8:45 ` vries at gcc dot gnu.org 2022-07-27 15:38 ` cel at us dot ibm.com 2022-07-27 15:42 ` vries at gcc dot gnu.org 2022-07-27 16:54 ` cel at us dot ibm.com 2022-09-02 12:55 ` vries at gcc dot gnu.org 2022-09-02 13:09 ` vries at gcc dot gnu.org
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-29247-4717-deCo9NqU9s@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.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).