From: Ian Lance Taylor <iant@google.com>
To: "Paulo J. Matos" <paulo@matos-sorge.com>
Cc: gcc@gcc.gnu.org
Subject: Re: unwind and type support in GCC47
Date: Tue, 03 Apr 2012 14:04:00 -0000 [thread overview]
Message-ID: <mcrwr5w29oo.fsf@dhcp-172-18-216-180.mtv.corp.google.com> (raw)
In-Reply-To: <jlesn1$bl5$1@dough.gmane.org> (Paulo J. Matos's message of "Tue, 03 Apr 2012 14:07:45 +0100")
"Paulo J. Matos" <paulo@matos-sorge.com> writes:
> On 30/03/12 05:11, Ian Lance Taylor wrote:
>
>> There really shouldn't be anything in the exception support that uses
>> SImode. That would be a bug. And I don't see anything that uses
>> SImode. What are you looking at? What I see is things that use mode
>> __unwind_word__, __word__, and __pointer__. Those types are under the
>> control of your backend.
>>
>
> I was mentioning these references to SI:
> unwind-pe.h:
> static const unsigned char *
> read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base,
> const unsigned char *p, _Unwind_Ptr *val)
> {
> union unaligned
> {
> void *ptr;
> unsigned u2 __attribute__ ((mode (HI)));
> unsigned u4 __attribute__ ((mode (SI)));
> unsigned u8 __attribute__ ((mode (DI)));
> signed s2 __attribute__ ((mode (HI)));
> signed s4 __attribute__ ((mode (SI)));
> signed s8 __attribute__ ((mode (DI)));
> } __attribute__((__packed__));
> ...
Hmmm, you're right, I didn't notice those. You said that on your system
QImode is 16 bits. These modes are being used to efficiently load
16-bit, 32-bit, and 64-bit values, in order to handle DW_EH_PE_udata2
and friends. This code is not portable in that it assumes 8 bit bytes
and 8 bit QImode. But I don't know how to fix it. What is the right
way to load a 16-bit or 32-bit value on your system?
> There are also some references to mode SI in unwind-dw2.c.
>
> And there's also this:
> unwind-dw2-fde.h:typedef int sword __attribute__ ((mode (SI)));
>
> Why hardcode these type sizes here?
That just looks like a bug. It should probably use __INT32_TYPE__
instead.
Ian
next prev parent reply other threads:[~2012-04-03 14:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 14:50 Paulo J. Matos
2012-03-30 4:11 ` Ian Lance Taylor
2012-04-03 13:08 ` Paulo J. Matos
2012-04-03 14:04 ` Ian Lance Taylor [this message]
2012-04-03 14:16 ` Paulo J. Matos
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=mcrwr5w29oo.fsf@dhcp-172-18-216-180.mtv.corp.google.com \
--to=iant@google.com \
--cc=gcc@gcc.gnu.org \
--cc=paulo@matos-sorge.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).