Files
rust/compiler/rustc_codegen_gcc/src
Jonathan Brouwer f9090000f4 Rollup merge of #160989 - N1ark:08-12-generic-float-intrinsincs, r=folkertdev
Make sin, cos, exp, exp2, log, log2, log10 generic

Rebased and smaller version of rust-lang/rust#153934

Following `fabs`, make the `sin`, `cos`, `exp`, `exp2`, `log`, `log2` and `log10` intrinsics generic over the float type, rather than having four variants per float type.

The first two commits are purely stylistic:
- reorganised Cranelift code to make following changes simpler
- moved a misplaced comment in `compiler/rustc_codegen_llvm/src/intrinsic.rs` that caused `x fmt` to give up

The last commit actually makes them generic! Most code is a bit simpler, ~~and this will also hopefully simplify adding support for these intrinsics for the future [`bf16` type](https://github.com/rust-lang/rust/pull/160859)~~ :)

Unfortunately both GCC and Cranelift backend changes are a bit churny. Their code is a bit, opaque, to put it kindly, and I didn't want to refactor those here.

r? @folkertdev
cc @RalfJung
2026-09-01 13:27:38 +02:00
..
2026-03-07 12:12:33 +00:00
2026-08-16 22:38:03 +02:00
2026-08-19 09:27:38 -07:00