This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to get rid of attribute(mode(word))?
- From: Ian Lance Taylor <iant at google dot com>
- To: Eric Christopher <echristo at apple dot com>
- Cc: Andreas Krebbel <Andreas dot Krebbel at de dot ibm dot com>, gcc at gcc dot gnu dot org
- Date: 02 Feb 2007 17:49:22 -0800
- Subject: Re: How to get rid of attribute(mode(word))?
- References: <20070130183740.GA10944@blc4eb430604175.ibm.com> <37133B96-7086-469C-B367-F3056AF3CC53@apple.com>
Eric Christopher <echristo@apple.com> writes:
> > One target is to identify more places where we can get rid of
> > _Unwind_Word.
> > Other places exist where we definitely need a data type like
> > _Unwind_Word
> > representing a general purpose register. So we have to find a way
> > to define
> > _Unwind_Word without using the mode(word) attribute.
>
> So, I might be missing something but I'm uncertain as to why you'd
> want to do this.
There was a long discussion about this a couple of months ago. The
summary was that __attribute__ ((mode (word))) was considered harmful.
It's safe enough when you use it within a program, but when you start
to use in a data structure shared by different codes you run into ABI
problems. A typical example is the eh_return_filter_mode target hook,
which was introduced (without documentation!) because Darwin needs to
access the same exception handling information with two different
values of word_mode.
Ian