> But it seems to be flagged as "nightly-only experimental" - but I'm
not sure what that means.

"nightly-only experimental" in Rust means this feature or functionality
is unavailable in the stable version (requires you to use the nightly
Rust compiler).

> The idea is to use that "by default" on ppc64el starting with 25.10.

Rust only has IEEE 754 standard 128-bit floats. Rust compiler does not
generate the `ppcf128` type in LLVM (see
https://github.com/search?q=repo%3Arust-
lang%2Frust%20ppcf128&type=code).

In the https://doc.rust-lang.org/stable/std/primitive.f128.html
document, it stated that: (f128 is) "A 128-bit floating-point type
(specifically, the “binary128” type defined in IEEE 754-2008)."

> At least for LLVM, this needs to be configured.

LLVM's middle-end and backend do not handle the distinction between IBM
long double and IEEE long double. In LLVM IR, the IEEE 754 standard
128-bit floats have the type "f128" while the IBM long double has the
type "ppcf128". LLVM expect the compiler front-end to lower the
language-specific 128-bit float types to the "f128" and "ppcf128" types
in LLVM IR. So Clang and other LLVM-based compilers have to handle this
logic instead of LLVM (see https://llvm.org/docs/LangRef.html#floating-
point-semantics and also https://llvm.org/docs/LangRef.html#floating-
point-types).

As far as I understand it, the only other compiler that could emit IBM
long double is the LLVM D compiler, which I have already submitted a
patch to the upstream to default to IEEE long double (see
https://github.com/ldc-developers/ldc/pull/4833).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2112391

Title:
  Enable Rust compiler(s) for using IEEE long-double-format on ppc64el
  starting with 25.10

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/2112391/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to