> That would be one possibility - if the idea is to define __intN for all 
> integer modes not matching a standard type (and passing 
> targetm.scalar_mode_supported_p), I advise posting details of what effect 
> this would have for all targets so we can see how many such types would 
> get added.

I was thinking of using the existing PARTIAL/FRACTIONAL_INT_MODE macros.

avr/avr-modes.def:FRACTIONAL_INT_MODE (PSI, 24, 3);
bfin/bfin-modes.def:PARTIAL_INT_MODE (DI, 40, PDI);
m32c/m32c-modes.def:PARTIAL_INT_MODE (SI, 24, PSI);
msp430/msp430-modes.def:PARTIAL_INT_MODE (SI, 20, PSI);
rs6000/rs6000-modes.def:PARTIAL_INT_MODE (TI, 128, PTI);
sh/sh-modes.def:PARTIAL_INT_MODE (SI, 22, PSI);
sh/sh-modes.def:PARTIAL_INT_MODE (DI, 64, PDI);

I suspect we'd have to filter out the power-of-two PSI ones though, leaving:

avr/avr-modes.def:FRACTIONAL_INT_MODE (PSI, 24, 3);
bfin/bfin-modes.def:PARTIAL_INT_MODE (DI, 40, PDI);
m32c/m32c-modes.def:PARTIAL_INT_MODE (SI, 24, PSI);
msp430/msp430-modes.def:PARTIAL_INT_MODE (SI, 20, PSI);
sh/sh-modes.def:PARTIAL_INT_MODE (SI, 22, PSI);

I'm assuming we need a mode to go with any type we create?  Otherwise,
we could add a FRACTIONAL_INT_TYPE(wrapper-mode, bits) macro to add
yet more.

Reply via email to