Add `f128` float to integer conversion functions by tgross35 · Pull Request #613 · rust-lang/compiler-builtins

@tgross35 tgross35 changed the title Add f16 and f128 conversion functions Add f128 float to integer conversion functions

May 18, 2024

@tgross35 tgross35 marked this pull request as ready for review

May 18, 2024 03:45

Amanieu

@tgross35

Deduplicate code used for float to integer conversions in order to make
adding `f128` conversion functions easier.
`as` casts are only allowed for primitives, doing the same operations
with `rustc_apfloat` requires using functions. Add a way to specify
these separately.

@tgross35

Add the following:

- `__fixtfsi`
- `__fixtfdi`
- `__fixtfti`
- `__fixunstfsi`
- `__fixunstfdi`
- `__fixunstfti`

tgross35 pushed a commit that referenced this pull request

Jan 31, 2026
Add `f128` float to integer conversion functions