rust/tests/codegen/float
Trevor Gross 5d818914af Always inline functions signatures containing f16 or f128
There are a handful of tier 2 and tier 3 targets that cause a LLVM crash
or linker error when generating code that contains `f16` or `f128`. The
cranelift backend also does not support these types. To work around
this, every function in `std` or `core` that contains these types must
be marked `#[inline]` in order to avoid sending any code to the backend
unless specifically requested.

However, this is inconvenient and easy to forget. Introduce a check for
these types in the frontend that automatically inlines any function
signatures that take or return `f16` or `f128`.

Note that this is not a perfect fix because it does not account for the
types being passed by reference or as members of aggregate types, but
this is sufficient for what is currently needed in the standard library.

Fixes: https://github.com/rust-lang/rust/issues/133035
Closes: https://github.com/rust-lang/rust/pull/133037
2024-11-14 16:18:41 -06:00
..
f16-f128-inline.rs Always inline functions signatures containing f16 or f128 2024-11-14 16:18:41 -06:00
f16.rs x86-32 float return for 'Rust' ABI: treat all float types consistently 2024-10-20 11:41:08 +02:00
f128.rs x86-32 float return for 'Rust' ABI: treat all float types consistently 2024-10-20 11:41:08 +02:00