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 1/4] change specific int128 -> generic intN


On Fri, 27 Jun 2014, DJ Delorie wrote:

> If you still disagree, let's first figure out what the right
> relationship between TYPE_SIZE and TYPE_SIZE_UNIT is, for types that
> aren't a multiple of BITS_PER_UNIT.

My suggestion: TYPE_SIZE should always be TYPE_SIZE_UNIT times 
BITS_PER_UNIT, so including any padding bits (and so should not exist, 
really - it's an extra pointer bulking up lots of trees with redundant 
information), while TYPE_PRECISION is what gives the number of value / 
sign bits.  If you're allocating bit-fields, TYPE_PRECISION will say how 
many bits to use; if you're allocating registers (which might not always 
correspond neatly to multiples of BITS_PER_UNIT), TYPE_MODE is what's 
relevant; otherwise, you're allocating whole bytes in memory and can use 
TYPE_SIZE_UNIT.

-- 
Joseph S. Myers
joseph@codesourcery.com


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