<div dir="ltr"><div>Hello everyone,</div><div><br></div><div>As Jim mentioned in last month's CFP meeting, I would like to propose to revisit and modernize the fixed point types as a C extension.</div><div><br></div><div>To provide context on why we are interested in this effort: several years ago, several embedded system teams in Google expressed their interest in using the fixed point types as a replacement for soft floats in their projects. After some initial investigation, we found the <a href="https://www.iso.org/standard/51126.html">ISO/IEC TR 18037:2008 - Programming languages - C - Extensions to support embedded processors</a> (or <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf">N1169</a>), and we set ourselves to provide an implementation of the TR in Clang/LLVM (<a href="https://lists.llvm.org/pipermail/cfe-dev/2018-April/057756.html">cfe-dev</a>, <a href="https://groups.google.com/g/llvm-dev/c/Yym8b13qLvQ?e=48417069">llvm-dev</a>). This feature is now available in clang 19 or after, under the `-ffixed-point` flag. And the library part of the standard is available in <a href="https://libc.llvm.org/headers/stdfix.html">LLVM libc</a> (built with clang-19 or after).</div><div><br></div><div>This has been used successfully to replace soft float usages and improved both code size and performance by several embedded projects in Google. I have attached slides by my colleague, Leonard Chan, demonstrating its improvement over soft floats when applied properly.</div><div><br></div><div>As we implement and extend the fixed point TR more, its datedness and complexity are more and more apparent. And we think that it would be much better to revisit and modernize the TR, making it more in line with the modern C23 and C2y styles.</div><div><br></div><div>Thanks,</div><div> Tue Ly</div>
</div>