> Yes. That's exactly the problem I'm trying to solve here. I'm making > partial int modes have real corresponding types, and they can be any > bit size, with target PS*modes to match. The MSP430, for example, has > 20-bit modes, 20-bit operands, and __int20. Rounding up to byte sizes > forces everything into an emulated SImode which makes code size huge > and performance much worse.
And the hardware really loads 20 bits and not 24 bits? If so, I think you might want to consider changing the unit to 4 bits instead of 8 bits. If no, the mode is padded and has 24-bit size so why is setting TYPE_PRECISION to 20 not sufficient to achieve what you want? > Thus, in these cases, TYPE_SIZE and TYPE_SIZE_UNIT no longer have a > "* BITS_PER_UNIT" mathematical relationship. I'm skeptical this can work, it's pretty fundamental. -- Eric Botcazou