Skip to content

Commit 9b1b89d

Browse files
committed
only use stable libm features
1 parent 6eae76c commit 9b1b89d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cranelift/codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ souper-ir = { version = "2.1.0", optional = true }
4444
sha2 = { version = "0.10.2", optional = true }
4545
rustc-hash = { workspace = true }
4646
wasmtime-math = { workspace = true }
47-
libm = { workspace = true, features = ["unstable-public-internals"] }
47+
libm = { workspace = true }
4848
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
4949
# Please don't add any unless they are essential to the task of creating binary
5050
# machine code. Integration tests that need external dependencies can be

cranelift/codegen/src/ir/immediates.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,8 @@ macro_rules! ieee_float {
704704
/// Returns the nearest integer to `self`. Rounds half-way cases to the number
705705
/// with an even least significant digit.
706706
pub fn round_ties_even(self) -> Self {
707-
Self::with_float(libm::generic::rint_round(self.$as_float(), libm::support::Round::Nearest).val)
707+
// TODO: when libm v0.2.16 is published Libm::roundeven can be used
708+
Self::with_float(self.$as_float().round_ties_even())
708709
}
709710
)?
710711
}

0 commit comments

Comments
 (0)