[Bug target/94194] x86: Provide feraiseexcept builtins
adhemerval.zanella at linaro dot org
gcc-bugzilla@gcc.gnu.org
Mon Mar 16 19:28:28 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94194
--- Comment #2 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Afaik the libc implementation is free to set any macro value for FE_*, although
glibc and other implementations I am awre of try to make is related to
architecture values when it does make sense (and it also tend to simplify the
implementation).
So I would expect that the compiler either would need to export a
system-neutral value (GCC_FE_* or something related) with the drawback it would
not be a direct replacement for the system library call (as other builtins tend
to be) or define functions that does not use input arguments (something like
__builtin_feraiseexcept_div_by_zero). For -fno-trapping-math I would expect to
be a nop in such a scenario, although I haven't given much thought about it.
However, I opened this bug more to check if this optimization would be worth
implementing. My take is to remove it from glibc installed headers [1], and my
impression is this should not add much from the compiler side of view as well.
[1] https://sourceware.org/pipermail/libc-alpha/2020-March/111775.html
More information about the Gcc-bugs
mailing list