From: Tom Tromey <tom@tromey.com>
To: "Leszek Swirski via gdb-patches" <gdb-patches@sourceware.org>
Cc: Leszek Swirski <leszeks@google.com>, palves@redhat.com
Subject: Re: [PATCH v3] [amd64] Fix AMD64 return value ABI in expression evaluation
Date: Tue, 16 Apr 2019 16:39:00 -0000 [thread overview]
Message-ID: <87v9zducov.fsf@tromey.com> (raw)
In-Reply-To: <20190214151810.149322-1-leszeks@google.com> (Leszek Swirski via gdb-patches's message of "Thu, 14 Feb 2019 16:18:10 +0100")
>>>>> ">" == Leszek Swirski via gdb-patches <gdb-patches@sourceware.org> writes:
>> This ABI mismatch resulted in issues when calling a function that returns
>> a class of size <16 bytes which has a base class, including issues such
>> as the "this" pointer being incorrect (as it was passed as the second
>> argument rather than the first).
I'm still looking into the problem, but this regressed an internal test
case here at AdaCore. In particular, this patch doesn't seem to treat
bitfields the same way that gcc does.
>> * amd64-tdep.c (amd64_classify_aggregate): Use cp_pass_by_reference
>> rather than a hand-rolled POD check when checking for forced MEMORY
>> classification.
This mentions cp_pass_by_reference but the patch doesn't actually
introduce a call to this function.
>> - /* 1. If the size of an object is larger than two eightbytes, or in
>> - C++, is a non-POD structure or union type, or contains
>> + /* 1. If the size of an object is larger than two eightbytes, or it has
>> unaligned fields, it has class memory. */
This area seems to differ between gcc and gdb as well. The psABI
mentions using 8 eightbytes here, but then has a complicated footnote
about the post-merge cleanup, so I'm not certain if gcc and gdb always
agree in practice.
Tom
next prev parent reply other threads:[~2019-04-16 16:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 13:35 [PATCH] " Leszek Swirski via gdb-patches
2019-02-14 14:28 ` Pedro Alves
2019-02-14 15:07 ` Leszek Swirski via gdb-patches
2019-02-14 15:16 ` [PATCH v2] " Leszek Swirski via gdb-patches
2019-02-14 15:18 ` [PATCH v3] " Leszek Swirski via gdb-patches
2019-02-14 15:26 ` Pedro Alves
2019-04-13 16:24 ` Leszek Swirski via gdb-patches
2019-04-16 16:39 ` Tom Tromey [this message]
2019-04-16 18:28 ` Tom Tromey
2019-04-24 18:03 ` Tom Tromey
2019-04-17 22:30 ` Tom de Vries
2019-04-18 17:54 ` Tom Tromey
2019-04-24 16:26 ` Regressions on gdb.base/call-{ar,rt}-st.exp on x86_64 native (was: Re: [PATCH v3] [amd64] Fix AMD64 return value ABI in expression evaluation) Sergio Durigan Junior
2019-04-24 17:51 ` Regressions on gdb.base/call-{ar,rt}-st.exp on x86_64 native Tom Tromey
2019-04-24 18:02 ` Sergio Durigan Junior
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=87v9zducov.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=leszeks@google.com \
--cc=palves@redhat.com \
/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