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


Andreas Krebbel <Andreas.Krebbel@de.ibm.com> writes:

> I think the abi_word_mode is a good idea and would prefer it to
> adding a set of target macros which seem to be unrelated to each other
> at first glance. As you already pointed out word_mode is maybe used too often
> in the middle-end and unfortunately it is also used where it shines trough
> to external interfaces (e.g. debug info, exception handling etc.).
> Defining abi_word_mode appears to be a good solution to me for decoupling the abi
> interface from word_mode. Please consider my patch only a first try. I've
> expected/hoped to start a discussion about where it makes sense to use 
> abi_word_mode and where not.

I think that you are making an assumption: that there is a single mode
which makes sense for a set of disparate uses.  I think that is a
rather strong assumption, and I think that you need to justify it, and
you need to justify it in the form of clear and precise documentation.
Otherwise we are just going to wind up with yet another ill-defined
concept with no clear guidance on when it should be used.

There is a clear alternative: treat the disparate uses separately, as
we alread do with, e.g., STACK_SIZE_MODE and
TARGET_EH_RETURN_FILTER_MODE (the latter being sadly undocumented).
If we treat these separately, it is relatively easy to write
documentation for them, and it is relatively easy to understand when
they should be used.

You need to get to that point with abi_word_mode before we could
consider it, and you are not there yet.

Ian


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