This is the mail archive of the gcc@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: BITS_PER_UNIT larger than 8 -- word addressing


On 2007-11-27 18:29, Michael Eager wrote:
> Joseph S. Myers wrote:
> > On Tue, 27 Nov 2007, Michael Eager wrote:
> >
> >> I think that there is a pervasive understanding that SImode is
> >> single precision integer, 32-bits long.
> >
> > Only among contributors not considering non-8-bit bytes. SImode is 4
> > times QImode, 4*BITS_PER_UNIT bits, and may not exist (or at least not be
> > particularly usable, much like the limitations on TImode on 32-bit
> > targets) with large BITS_PER_UNIT.
>
> I think you just described the majority of contributors. :-)
>
> It's human nature not to recognize one's tacit assumptions or their
> consequences.


I assume that GCC internals assume that memory can be byte (8 bits) addressed - for historical reasons. Therefore, the sizes of all types are multiples of a byte. The same is true for addressing values in memory. (Sizes of types and their addresses must be separated more precisely. A 32 bit value could be on a 4 bit boundary!) But this is changing. Addressable units are on 32 bit boundaries or even on 4 bit boundaries today. Well, this is the problem I'm running in right now.

Boris


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