Re: [PATCH v7 06/25] rust: add `compiler_builtins` crate

From: Miguel Ojeda
Date: Tue May 24 2022 - 08:30:10 EST


On Mon, May 23, 2022 at 8:37 PM Nick Desaulniers
<ndesaulniers@xxxxxxxxxx> wrote:
>
> ^ Any progress on this? Got any links to any feature requests or bug reports.

We got the floating point ones removed via a new feature flag
(https://github.com/rust-lang/rust/pull/86048) that Gary added (they
were already removed by the time of the message you link), so upstream
Rust is willing to add this sort of thing for us.

For the `i128`/`u128` ones, no change; but upstream Rust is aware of
this need (e.g. we presented them in the Rust CTCFT from November:
https://youtu.be/azcrUzeY3Pw?t=751).

See also https://github.com/Rust-for-Linux/linux/issues/2 and linked
issues there for more information.

> Also, I'm not sure my concern about explicit build failures for C code
> was ever addressed? We have a constant problem with `long long`
> division on ARCH=arm32 and ARCH=i386 in C code.
> https://lore.kernel.org/lkml/CAKwvOdk+A2PBdjSFVUhj4xyCGCKujtej1uPgywQgrKPiK2ksPw@xxxxxxxxxxxxxx/

In my reply to that message I mentioned that the goal is to avoid the
panicking intrinsics to begin with. We already removed some, so I
would try to continue down that path. If that proves not possible,
then yeah, we would need something different.

Cheers,
Miguel