[libc-commits] [libc] [libc] Implement basic 'fenv.h' utilities on the AMD GPU (PR #83500)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Fri Mar 1 06:44:26 PST 2024


jhuber6 wrote:

> Many of these are reinventing generic intrinsics (https://llvm.org/docs/LangRef.html#floating-point-environment-manipulation-intrinsics). We implement some of these. The rounding modes also have extended values for the mixed f32/f64 cases

Okay, so I suppose the plan of attack here is to finish implementing these as it seems we only have `setround`. Then we can update this patch and make it use those intrinsics. However, I do not see any intrinsics for stuff like enabling / disabling things. Likely we will want to write the intrinsic to get the fpenv and then treat it as an implementation defined bit so doing something like writing the exceptions becomes `__builtin_getenv()` into `__builtin_setenv()` after modifying the bits.

https://github.com/llvm/llvm-project/pull/83500


More information about the libc-commits mailing list