This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Introduce abi_word_mode
- From: Ian Lance Taylor <iant at google dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: Andreas dot Krebbel at de dot ibm dot com (Andreas Krebbel), gcc-patches at gcc dot gnu dot org
- Date: 06 Oct 2006 10:14:29 -0700
- Subject: Re: [PATCH] Introduce abi_word_mode
- References: <200610061148.k96BmVHI016255@d12av02.megacenter.de.ibm.com>
"Ulrich Weigand" <uweigand@de.ibm.com> writes:
> > For what it's worth, the EH data structures already use #ifdefs to
> > pick the right size for a particular target--see unwind-generic.h.
> > TARGET_EH_RETURN_FILTER_MODE exists to make the definition of
> > _Unwind_Word match the way the value is used in except.c. Something
> > like this will be required if you want to compile new code that uses a
> > different word size and wants to link against an existing libgcc_eh.so.
>
> I'm not sure I follow you here -- the #ifdef in unwind-generic.h
> appears to be related to HPUX/IA64 being unhappy with the definition
> of attribute ((mode (pointer))), not attribute ((mode (word))).
Yes, I was really just commenting on the existing use of #ifdef. But
for your purposes it doesn't matter, since you want to compile the
library once and then use it from two different pieces of code
compiled in two different ways.
> - Define a new abi_word_mode (from the target's UNITS_PER_ABI_WORD)
> that is to represent the mode of attibute ((mode (word))).
>
> - Do not change unwind-generic.h -- its data structures will now
> automatically correspond to the abi_word_mode.
>
> - Explicitly use abi_word_mode in except.c when refering to data
> structures also manipulated by libgcc_eh code.
>
> - This obsoletes TARGET_EH_RETURN_FILTER_MODE.
>
> > I'm willing to look at a patch which fixes those cases only.
>
> Just to clarify, is the solution outlined above what you
> intended, or did I misunderstand?
That is what I intended (plus also use abi_word_mode in a couple of
places in optabs.c, of course). Sorry for being confusing.
Ian