[libc-commits] [libc] [libc] Enable more entrypoints for riscv (PR #102055)

via libc-commits libc-commits at lists.llvm.org
Tue Aug 6 07:37:20 PDT 2024


================
@@ -57,7 +62,15 @@ class SetPayloadTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
     EXPECT_EQ(FPBits::quiet_nan(Sign::POS, 0x123).uintval(),
               FPBits(res).uintval());
 
-    EXPECT_EQ(0, func(&res, T(FPBits::FRACTION_MASK >> 1)));
+    // The following code is creating a NaN manually to prevent a conversion
+    // from BigInt to long double.
----------------
overmighty wrote:

Nit: in this case it's `float128`. The `long double` variant of `setpayload` isn't enabled yet.

```suggestion
    // Essentially this:
    //   T nan_payload = T(FPBits::FRACTION_MASK >> 1);
    // but won't try to cast from BigInt to a floating-point type on RISC-V,
    // which supports float128 but not 128-bit ints.
```

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


More information about the libc-commits mailing list