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: Geoffrey Keating <geoffk at apple dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: iant at google dot com (Ian Lance Taylor), Andreas dot Krebbel at de dot ibm dot com (Andreas Krebbel), gcc-patches at gcc dot gnu dot org
- Date: 08 Oct 2006 22:27:29 -0700
- Subject: Re: [PATCH] Introduce abi_word_mode
- References: <87fye04kc3.fsf@talisman.home> <200610071606.k97G6F8n019184@d12av02.megacenter.de.ibm.com>
"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))).