On Tue, 8 Nov 2011, David Brown wrote: > The guts of gcc already know about types like "signed short _Fract", and can > handle them well (at least for some targets). It is always easier for the
Actually, I'd say they are handled badly. The approach of separate machine modes for them going right into the back end is not a good approach at all; at an appropriate point, fixed-point *types* should be lowered to fixed-point *operations* on generic types (some would just be existing operations, some would be saturating operations, some would be multiply-and-shift). See the discussion of the ARM fixed-point support <http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00846.html>; duplicating (for every target) support for implementing a fixed-point operation using a generic integer operation is not sensible. (Fractional types do make sense as an API; treating saturation as a type property rather than an operation property is a more doubtful aspect of TR 18037. But in both cases there should be a lowering pass.) -- Joseph S. Myers jos...@codesourcery.com