cranelift: Upgrade libm to 0.2.4 (#4670)
* cranelift: Upgrade libm to 0.2.4 This resolves an issue with incorrect fmaf on the x86_64-pc-windows-gnu target under some inputs. See: #4517 * supply-chain: Vet `libm` 0.2.4
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -1611,9 +1611,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libm"
|
name = "libm"
|
||||||
version = "0.2.2"
|
version = "0.2.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db"
|
checksum = "c7ce35d4899fa3c0558d4f5082c98927789a01024270711cf113999b66ced65a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
test interpret
|
|
||||||
target x86_64 has_avx=false has_fma=false
|
|
||||||
|
|
||||||
; The interpreter can run `fma.clif` on most platforms, however on `x86_64-pc-windows-gnu` we
|
|
||||||
; use libm which has issues with some inputs. We should delete this file and enable the interpreter
|
|
||||||
; on the main `fma.clif` file once those are fixed. The same issue applies to x86 with fma disabled
|
|
||||||
; since it will call the native runtime's fma function.
|
|
||||||
|
|
||||||
; See: https://github.com/bytecodealliance/wasmtime/pull/4517
|
|
||||||
; See: https://github.com/rust-lang/libm/issues/263
|
|
||||||
|
|
||||||
function %fma_f32(f32, f32, f32) -> f32 {
|
|
||||||
block0(v0: f32, v1: f32, v2: f32):
|
|
||||||
v3 = fma v0, v1, v2
|
|
||||||
return v3
|
|
||||||
}
|
|
||||||
; run: %fma_f32(0x9.0, 0x9.0, 0x9.0) == 0x1.680000p6
|
|
||||||
; run: %fma_f32(0x83.0, 0x2.68091p6, 0x9.88721p1) == 0x1.3b88e6p14
|
|
||||||
|
|
||||||
|
|
||||||
function %fma_f64(f64, f64, f64) -> f64 {
|
|
||||||
block0(v0: f64, v1: f64, v2: f64):
|
|
||||||
v3 = fma v0, v1, v2
|
|
||||||
return v3
|
|
||||||
}
|
|
||||||
; run: %fma_f64(0x9.0, 0x9.0, 0x9.0) == 0x1.680000p6
|
|
||||||
; run: %fma_f64(0x1.3b88ea148dd4ap14, 0x2.680916809121p6, 0x9.887218721837p1) == 0x1.7ba6ebee17417p21
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
test interpret
|
||||||
test run
|
test run
|
||||||
target aarch64
|
target aarch64
|
||||||
target s390x
|
target s390x
|
||||||
|
target x86_64 has_avx=false has_fma=false
|
||||||
|
|
||||||
function %fma_f32(f32, f32, f32) -> f32 {
|
function %fma_f32(f32, f32, f32) -> f32 {
|
||||||
block0(v0: f32, v1: f32, v2: f32):
|
block0(v0: f32, v1: f32, v2: f32):
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ smallvec = "1.6.1"
|
|||||||
thiserror = "1.0.15"
|
thiserror = "1.0.15"
|
||||||
|
|
||||||
[target.x86_64-pc-windows-gnu.dependencies]
|
[target.x86_64-pc-windows-gnu.dependencies]
|
||||||
libm = "0.2"
|
libm = "0.2.4"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
cranelift-frontend = { path = "../frontend", version = "0.88.0" }
|
cranelift-frontend = { path = "../frontend", version = "0.88.0" }
|
||||||
|
|||||||
@@ -19,6 +19,16 @@ criteria = "safe-to-deploy"
|
|||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
notes = "I am the author of this crate."
|
notes = "I am the author of this crate."
|
||||||
|
|
||||||
|
[[audits.libm]]
|
||||||
|
who = "Alex Crichton <alex@alexcrichton.com>"
|
||||||
|
criteria = "safe-to-deploy"
|
||||||
|
delta = "0.2.2 -> 0.2.4"
|
||||||
|
notes = """
|
||||||
|
This diff primarily fixes a few issues with the `fma`-related functions,
|
||||||
|
but also contains some other minor fixes as well. Everything looks A-OK and
|
||||||
|
as expected.
|
||||||
|
"""
|
||||||
|
|
||||||
[[audits.regalloc2]]
|
[[audits.regalloc2]]
|
||||||
who = "Jamey Sharp <jsharp@fastly.com>"
|
who = "Jamey Sharp <jsharp@fastly.com>"
|
||||||
criteria = "safe-to-deploy"
|
criteria = "safe-to-deploy"
|
||||||
|
|||||||
Reference in New Issue
Block a user