On Fri, Nov 4, 2022 at 2:47 PM Michael Zoran <
mic...@michaelzoran.net> wrote:
>
> Have anybody looked into adding the q extension to any of the standard C compilers such as gcc and clang?
The RISC-V psABI document defines a corresponding ABI ("abi-lp64q").
GCC has support for quad precision floating-point processing, but the
RISC-V backend does not implement the required pieces.
Other backends (e.g. PowerPC or HP-UX) provide that.
I'm not aware of anyone working on RISC-V support in GCC.
If you plan to work on this, you could consider implementing QEMU
support or use the implementation in Spike, as I am not aware of any
RISC-V hardware that supports 128-bit floating point instructions.
> I'm thinking that long double could use 128bit ieee floating point.
The RISC-V psABI defines long double to be of 16 bytes (size and alignment).
That is also how it is implemented in GCC for e.g. PowerPC or HP-UX.
GCC also knows the type __float128 and uses that for its APIs in libquadmath.
BR
Christoph