rust/compiler/rustc_codegen_gcc/src
bors 0a3b557d52 Auto merge of #95317 - Jules-Bertholet:round_ties_to_even, r=pnkfelix,m-ou-se,scottmcm
Add `round_ties_even` to `f32` and `f64`

Tracking issue: #96710

Redux of #82273. See also #55107

Adds a new method, `round_ties_even`, to `f32` and `f64`, that rounds the float to the nearest integer , rounding halfway cases to the number with an even least significant bit. Uses the `roundeven` LLVM intrinsic to do this.

Of the five IEEE 754 rounding modes, this is the only one that doesn't already have a round-to-integer function exposed by Rust (others are `round`, `floor`, `ceil`, and `trunc`).  Ties-to-even is also the rounding mode used for int-to-float and float-to-float `as` casts, as well as float arithmentic operations. So not having an explicit rounding method for it seems like an oversight.

Bikeshed: this PR currently uses `round_ties_even` for the name of the method. But maybe `round_ties_to_even` is better, or `round_even`, or `round_to_even`?
2023-03-07 09:43:12 +00:00
..
back simplify a self-profiling activity call in the cg_gcc backend 2022-04-07 15:47:20 +02:00
intrinsic Auto merge of #95317 - Jules-Bertholet:round_ties_to_even, r=pnkfelix,m-ou-se,scottmcm 2023-03-07 09:43:12 +00:00
abi.rs Merge apply_attrs_callsite into call and invoke 2022-10-01 17:01:31 +00:00
allocator.rs Rewrite implementation of #[alloc_error_handler] 2022-10-31 16:32:57 +00:00
archive.rs Rewrite LLVM's archive writer in Rust 2022-11-26 19:35:32 +00:00
asm.rs Merge apply_attrs_callsite into call and invoke 2022-10-01 17:01:31 +00:00
base.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
builder.rs abi: add AddressSpace field to Primitive::Pointer 2023-01-22 23:41:39 -05:00
callee.rs Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00
common.rs abi: add AddressSpace field to Primitive::Pointer 2023-01-22 23:41:39 -05:00
consts.rs create and use GlobalAlloc::address_space 2023-01-25 01:46:19 -05:00
context.rs Use List::empty() instead of mk_substs(&[]). 2023-02-24 07:33:02 +11:00
coverageinfo.rs Merge commit 'e228f0c16e' into libgccjit-codegen 2021-08-15 08:29:07 -04:00
debuginfo.rs Introduce composite debuginfo. 2022-11-15 17:53:50 +00:00
declare.rs Use custom entry name in gcc 2022-11-15 22:15:55 +05:30
errors.rs Move linkage type check to HIR analysis and fix semantics issues. 2022-12-05 15:05:43 -08:00
int.rs Merge commit 'e8dca3e87d' into sync_from_cg_gcc 2022-06-06 22:04:37 -04:00
lib.rs various: translation resources from cg backend 2023-02-22 09:15:54 +00:00
mono_item.rs Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00
type_.rs Add LLVM KCFI support to the Rust compiler 2022-12-08 17:24:39 -08:00
type_of.rs Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00