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:

> The GCC middle end has the notion of a "word", which is somewhat vaguely
> defined as "the natural mode of a general-purpose register".  Its main
> technical distinction, as I see it, is that it defines the behaviour of
> SUBREG -- multi-word SUBREGs are just fundamentally different from 
> subword SUBREGs.  (Of course, this is not just an arbitrary GCC wart, 
> but reflects the fact that parts of a register are typically not directly
> addressable.)  As a back-end writer, this leaves me no choice how to
> define UNITS_PER_WORD.
> 
> On the other hand, for better or worse, GCC has made this internal detail
> available at a source code level via attribute ((mode (word))).  This
> makes the choice of word_mode relevant at an ABI level.  Again, if I 
> want to implement a GCC configuration that adheres to a pre-existing ABI
> (including its attribute ((mode (word)))), I have no choice how to
> define UNITS_PER_WORD.

I think this is an excellent argument for deprecating and removing
attribute((mode(word))).


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