public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tdep/29543] [gdb/tdep, ppc] inferior call with long double vararg not handled correctly
Date: Wed, 07 Sep 2022 13:46:09 +0000	[thread overview]
Message-ID: <bug-29543-4717-KeHLlZjez0@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29543-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29543

--- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 14320
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14320&action=edit
tentative patch

(In reply to Ulrich Weigand from comment #9)
> (In reply to Tom de Vries from comment #8)
> > (In reply to Ulrich Weigand from comment #7)
> > > Note it would appear the same problem also exists when handling homogeneous
> > > (ELFv2) or single-element (ELFv1) aggregates: these also need 16-byte
> > > alignment if the base type is a vector or _Float128 type.
> > 
> > Can you or Carl propose a patch for this additional problem?
> 
> It's just a few lines further down in the same function, in the final else
> branch:
> 
>   else
>     {
>       ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 0, argpos);
> [...]
> 
> followed by either ppc64_sysv_abi_push_vreg or ppc64_sysv_abi_push_freg.
> 
> The problem is that alignment of 0 is only correct in those cases where
> ppc64_sysv_abi_push_freg is called - in those cases where
> ppc64_sysv_abi_push_vreg is called, we also need to use 16 byte alignment
> here.
> 

Like this?

I've also added a test-case, but I haven't been able to try this on ppc64le
yet.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-09-07 13:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02 13:00 [Bug tdep/29543] New: [gdb/tdep] inferior call with complex " vries at gcc dot gnu.org
2022-09-02 13:07 ` [Bug tdep/29543] " vries at gcc dot gnu.org
2022-09-02 13:10 ` [Bug tdep/29543] [gdb/tdep, ppc] " vries at gcc dot gnu.org
2022-09-02 13:16 ` vries at gcc dot gnu.org
2022-09-02 13:26 ` [Bug tdep/29543] [gdb/tdep, ppc] inferior call with " vries at gcc dot gnu.org
2022-09-02 15:14 ` vries at gcc dot gnu.org
2022-09-04  7:49 ` vries at gcc dot gnu.org
2022-09-04  7:56 ` vries at gcc dot gnu.org
2022-09-05 16:23 ` uweigand at gcc dot gnu.org
2022-09-06  5:44 ` vries at gcc dot gnu.org
2022-09-07 12:10 ` uweigand at gcc dot gnu.org
2022-09-07 13:46 ` vries at gcc dot gnu.org [this message]
2022-09-07 15:33 ` cel at us dot ibm.com
2022-09-07 17:16 ` vries at gcc dot gnu.org
2022-09-07 18:22 ` cel at us dot ibm.com
2022-09-12  9:05 ` vries at gcc dot gnu.org
2022-09-16 15:12 ` vries at gcc dot gnu.org
2022-09-16 16:38 ` cel at us dot ibm.com
2022-11-15  0:55 ` cel at us dot ibm.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-29543-4717-KeHLlZjez0@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: link
Be 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).