Skip to content

Commit 682f05e

Browse files
committed
wasm: update for rintf intrinsic rename
1 parent 2ca25b4 commit 682f05e

File tree

1 file changed

+2
-2
lines changed
  • crates/core_arch/src/wasm32

1 file changed

+2
-2
lines changed

crates/core_arch/src/wasm32/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub fn f32_trunc(a: f32) -> f32 {
8686
#[must_use = "method returns a new number and does not mutate the original value"]
8787
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
8888
pub fn f32_nearest(a: f32) -> f32 {
89-
unsafe { crate::intrinsics::rintf32(a) }
89+
crate::intrinsics::round_ties_even_f32(a)
9090
}
9191

9292
/// Generates the [`f32.sqrt`] instruction, returning the square root of the number `a`.
@@ -157,7 +157,7 @@ pub fn f64_trunc(a: f64) -> f64 {
157157
#[must_use = "method returns a new number and does not mutate the original value"]
158158
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
159159
pub fn f64_nearest(a: f64) -> f64 {
160-
unsafe { crate::intrinsics::rintf64(a) }
160+
crate::intrinsics::round_ties_even_f64(a)
161161
}
162162

163163
/// Generates the [`f64.sqrt`] instruction, returning the square root of the number `a`.

0 commit comments

Comments
 (0)