fixed point notation in clang

Hi, we are trying to implement in the LLVM/Clang framework the fixed point notation as specified in the ISO/IEC TR 18037 ( ).

We’ve seen different old discussions about this topic and we are wondering on what is the status today since seems that the framework doesn’t support it yet.

We’ve already asked on the llvm-dev mailing list and they point us here because in their opinion it is possible to implement part of the specific ( the non-saturating part ) as a pure clang extension.

Do you know if there is anybody working on this? If not, do you have any advice or idea for the implementation of the non-saturating part?

Thank you very much

Best regards

We have been working on implementing support for fixed-point in LLVM and Clang for our proprietary target which is programmed in DSP-C, the precursor of Embedded C. We initially attempted to implement this by modifying the existing integer type to support a scaling factor, but this turned out to be an unwieldy solution.

We are currently working on adding support for DSP-C to Clang. As you mentioned, mailing list recommendations have been to use existing integer types for fixed-point operations and intrinsics for saturation. This is the approach we have chosen, but we have decided to implement multiplication and division of fixed-point numbers with intrinsics as well in order to simplify instruction selection.

We would be happy to trade ideas about the subject with you and work out a solution that would be acceptable by the larger LLVM community.