riscv-non-isa / riscv-c-api-doc

Documentation of the RISC-V C API
https://jira.riscv.org/browse/RVG-4
Creative Commons Attribution 4.0 International
69 stars 39 forks source link

GCC builtins #1

Closed aswaterman closed 6 years ago

aswaterman commented 6 years ago

There are only two builtins, and they are only used by the GCC internals. I would suggest a way to hide them, rather than making them part of the API. They are:

__builtin_riscv_frflags
__builtin_riscv_fsflags

which read and swap the floating-point exception flags, respectively.

jim-wilson commented 6 years ago

These are used for the fenv support. There isn't a way to hide them, or restrict usage of them, but we could leave them undocumented.

aswaterman commented 6 years ago

Leaving them undocumented (hence not part of the official API) seems reasonable to me.