This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Introduce abi_word_mode
firstname.lastname@example.org (Richard Kenner) writes:
> > I think it's only superficially valuable. I think that when you
> > really try to write code that uses it, you find that it is actually
> > not very helpful. The type of exact width BITS_PER_WORD has very
> > little meaning or use.
> The case that comes to mind is writing an array that represents a register
> save area. In that case, word_mode is precisely what you want.
Except that it isn't, since many ABIs have saved registers which are
smaller or larger than word_mode.
For example, on powerpc, there are registers to save of size 32, 64,
and 128 bits. If you wanted to fit a register into each array
element, you have to use 128 bits; if you don't mind having a register
take multiple elements, you might as well use 'char'.
I am firmly of the belief that every use of word_mode in the compiler
represents some kind of bug or design deficiency (and I seem to
remember saying the same thing the last time this came up). In each
use of it some specific thing is meant, but it is not always the same
thing, and sometimes the thing that is meant does not always exist.