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


> > What are GET_MODE_BITSIZE and GET_MODE_PRECISION for PSImode?
> 
> It *should* be 20 and 20 for msp430.  But GET_MODE_BITSIZE returns 32,
> because it's a macro that does GET_MODE_SIZE * BITS_PER_UNIT, so it
> cannot return 20.

No, it should not be 20, mode sizes are multiple of the unit, you're mixing 
precision and size.  I doubt the hardware accesses 20 bits, more probably 24 
or 32 bits, so the mode size cannot be 20 bits.

> GCC typically uses size for "fits in a" tests.

Then change them to use the precision when this matters, the wide-int folks 
have already changed them in a few places but that's probably not sufficient.

-- 
Eric Botcazou


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