This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Introduce abi_word_mode


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]