Update cranelifte and enable more SIMD spec tests (#806)

* Update cranelift to 0.54

* Enable entire SIMD spec test directory and skip failing tests
This commit is contained in:
Andrew Brown
2020-01-10 17:02:42 -08:00
committed by Dan Gohman
parent ad2e94fce3
commit f592811c9a
7 changed files with 47 additions and 55 deletions

32
Cargo.lock generated
View File

@@ -341,18 +341,18 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-bforest" name = "cranelift-bforest"
version = "0.53.0" version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b065d5992ea22903200c56dd2b3a7062a1311b49739ffd2be9215f882204f73" checksum = "bd3225fff1be118941c5fb66f1fb1f7f3e86468fac0e7364713c4fb99b72632b"
dependencies = [ dependencies = [
"cranelift-entity", "cranelift-entity",
] ]
[[package]] [[package]]
name = "cranelift-codegen" name = "cranelift-codegen"
version = "0.53.0" version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ae646133a3dda0af636eb4e2928d282a976c836392e0de57a5750ca9eb132e1" checksum = "f3e3e6679892029f76a99b9059d2b74e77ac03637d573bb014bc21579ec1b7da"
dependencies = [ dependencies = [
"byteorder", "byteorder",
"cranelift-bforest", "cranelift-bforest",
@@ -368,9 +368,9 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-codegen-meta" name = "cranelift-codegen-meta"
version = "0.53.0" version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "883a636641a34034d16d1986557fdf815245140c4bb9e6561a6cb8ebacd7b9d4" checksum = "3cabe691548e28ca82ebd218f2fe76eec4c5629b64ef3db8b58443b7d9047275"
dependencies = [ dependencies = [
"cranelift-codegen-shared", "cranelift-codegen-shared",
"cranelift-entity", "cranelift-entity",
@@ -378,24 +378,24 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-codegen-shared" name = "cranelift-codegen-shared"
version = "0.53.0" version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3467bb48aa1b6a4c0da0fa0b5fea7f78f96bbf4bbf054eeb053b5e2e8794387" checksum = "d173252ffade4aa6e929090977b9a4cd5ac28e15a42626f878be3844b3000ad9"
[[package]] [[package]]
name = "cranelift-entity" name = "cranelift-entity"
version = "0.53.0" version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03578fa46b2009c4575494b0ecf8319a79bc913a6c1be3a2cb55ee7089c59989" checksum = "3498ad9ba021715716a1c52e2b31d7829a149913fb0d88493e4b07d3b772b656"
dependencies = [ dependencies = [
"serde", "serde",
] ]
[[package]] [[package]]
name = "cranelift-frontend" name = "cranelift-frontend"
version = "0.53.0" version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54859b486e505c03d5d8982216509eb99782ef5a3f7f8cbe86cd73967975c49b" checksum = "521a30773b8de74345c807a38853f055aca8fecaa39a0fc7698bfebc5a3da515"
dependencies = [ dependencies = [
"cranelift-codegen", "cranelift-codegen",
"log", "log",
@@ -405,9 +405,9 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-native" name = "cranelift-native"
version = "0.53.0" version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b245d7376b7200a5dcce955761f4f7396019beda4a788d9cbe555308f1869cd2" checksum = "624e755cbe984e437308968239736e7f9aa3193e99928fb76eec7a1946627b34"
dependencies = [ dependencies = [
"cranelift-codegen", "cranelift-codegen",
"raw-cpuid", "raw-cpuid",
@@ -416,9 +416,9 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-wasm" name = "cranelift-wasm"
version = "0.53.0" version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "115e207912c5841c3932b366be979b34a62ee32c839c2ddbc1c81877cd8ec03c" checksum = "0320733e518ab9e0e2d1a22034d40e2851fb403ed14db5220cf9b86576b9cfd4"
dependencies = [ dependencies = [
"cranelift-codegen", "cranelift-codegen",
"cranelift-entity", "cranelift-entity",

View File

@@ -30,28 +30,8 @@ fn main() -> anyhow::Result<()> {
// Skip running spec_testsuite tests if the submodule isn't checked // Skip running spec_testsuite tests if the submodule isn't checked
// out. // out.
if spec_tests > 0 { if spec_tests > 0 {
start_test_module(&mut out, "simd")?; test_directory(&mut out, "tests/spec_testsuite/proposals/simd", strategy)
write_testsuite_tests( .expect("generating tests");
&mut out,
"tests/spec_testsuite/proposals/simd/simd_address.wast",
"simd",
strategy,
)?;
write_testsuite_tests(
&mut out,
"tests/spec_testsuite/proposals/simd/simd_align.wast",
"simd",
strategy,
)?;
// FIXME this uses some features from the reference types proposal
// (multi-table) which aren't fully implemented yet
// write_testsuite_tests(
// &mut out,
// "tests/spec_testsuite/proposals/simd/simd_const.wast",
// "simd",
// strategy,
// )?;
finish_test_module(&mut out)?;
test_directory( test_directory(
&mut out, &mut out,
@@ -167,10 +147,22 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
(_, _) if testname.starts_with("simd") => return true, (_, _) if testname.starts_with("simd") => return true,
(_, _) if testsuite.ends_with("multi_value") => return true, (_, _) if testsuite.ends_with("multi_value") => return true,
// Lightbeam doesn't support float arguments on the stack. // Lightbeam doesn't support float arguments on the stack.
("spec_testsuite", "call.wast") => return true, ("spec_testsuite", "call") => return true,
_ => (), _ => (),
}, },
"Cranelift" => match (testsuite, testname) { "Cranelift" => match (testsuite, testname) {
("simd", "simd_bit_shift") => return true, // FIXME Unsupported feature: proposed SIMD operator I8x16Shl
("simd", "simd_const") => return true, // FIXME Invalid input WebAssembly code at offset 474: Unexpected data at the end of the section
("simd", "simd_conversions") => return true, // FIXME Unsupported feature: proposed SIMD operator I16x8NarrowI32x4S
("simd", "simd_f32x4") => return true, // FIXME expected V128(F32x4([CanonicalNan, CanonicalNan, Value(Float32 { bits: 0 }), Value(Float32 { bits: 0 })])), got V128(18428729675200069632)
("simd", "simd_f64x2") => return true, // FIXME expected V128(F64x2([Value(Float64 { bits: 9221120237041090560 }), Value(Float64 { bits: 0 })])), got V128(0)
("simd", "simd_f64x2_arith") => return true, // FIXME expected V128(F64x2([Value(Float64 { bits: 9221120237041090560 }), Value(Float64 { bits: 13835058055282163712 })])), got V128(255211775190703847615975447847722024960)
("simd", "simd_i64x2_arith") => return true, // FIXME Unsupported feature: proposed SIMD operator I64x2Mul
("simd", "simd_lane") => return true, // FIXME invalid u8 number: constant out of range: (v8x16.shuffle -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14...
("simd", "simd_load") => return true, // FIXME Unsupported feature: proposed SIMD operator I8x16Shl
("simd", "simd_load_extend") => return true, // FIXME Unsupported feature: proposed SIMD operator I16x8Load8x8S { memarg: MemoryImmediate { flags: 0, offset: 0 } }
("simd", "simd_load_splat") => return true, // FIXME Unsupported feature: proposed SIMD operator V8x16LoadSplat { memarg: MemoryImmediate { flags: 0, offset: 0 } }
("simd", "simd_splat") => return true, // FIXME Unsupported feature: proposed SIMD operator I8x16ShrS
_ => {} _ => {}
}, },
_ => panic!("unrecognized strategy"), _ => panic!("unrecognized strategy"),

View File

@@ -13,9 +13,9 @@ edition = "2018"
[dependencies] [dependencies]
anyhow = "1.0" anyhow = "1.0"
cranelift-codegen = { version = "0.53", features = ["enable-serde"] } cranelift-codegen = { version = "0.54", features = ["enable-serde"] }
cranelift-entity = { version = "0.53", features = ["enable-serde"] } cranelift-entity = { version = "0.54", features = ["enable-serde"] }
cranelift-wasm = { version = "0.53", features = ["enable-serde"] } cranelift-wasm = { version = "0.54", features = ["enable-serde"] }
wasmparser = "0.47.0" wasmparser = "0.47.0"
lightbeam = { path = "../lightbeam", optional = true, version = "0.9.0" } lightbeam = { path = "../lightbeam", optional = true, version = "0.9.0" }
indexmap = "1.0.2" indexmap = "1.0.2"
@@ -46,7 +46,7 @@ tempfile = "3"
target-lexicon = { version = "0.10.0", default-features = false } target-lexicon = { version = "0.10.0", default-features = false }
pretty_env_logger = "0.3.0" pretty_env_logger = "0.3.0"
rand = { version = "0.7.0", default-features = false, features = ["small_rng"] } rand = { version = "0.7.0", default-features = false, features = ["small_rng"] }
cranelift-codegen = { version = "0.53", features = ["enable-serde", "all-arch"] } cranelift-codegen = { version = "0.54", features = ["enable-serde", "all-arch"] }
filetime = "0.2.7" filetime = "0.2.7"
[badges] [badges]

View File

@@ -11,11 +11,11 @@ readme = "README.md"
edition = "2018" edition = "2018"
[dependencies] [dependencies]
cranelift-codegen = { version = "0.53", features = ["enable-serde"] } cranelift-codegen = { version = "0.54", features = ["enable-serde"] }
cranelift-entity = { version = "0.53", features = ["enable-serde"] } cranelift-entity = { version = "0.54", features = ["enable-serde"] }
cranelift-wasm = { version = "0.53", features = ["enable-serde"] } cranelift-wasm = { version = "0.54", features = ["enable-serde"] }
cranelift-native = "0.53" cranelift-native = "0.54"
cranelift-frontend = "0.53" cranelift-frontend = "0.54"
wasmtime-environ = { path = "../environ", version = "0.9.0" } wasmtime-environ = { path = "../environ", version = "0.9.0" }
wasmtime-runtime = { path = "../runtime", version = "0.9.0" } wasmtime-runtime = { path = "../runtime", version = "0.9.0" }
wasmtime-debug = { path = "../debug", version = "0.9.0" } wasmtime-debug = { path = "../debug", version = "0.9.0" }

View File

@@ -19,7 +19,7 @@ memoffset = "0.5.3"
itertools = "0.8.2" itertools = "0.8.2"
capstone = "0.6.0" capstone = "0.6.0"
thiserror = "1.0.9" thiserror = "1.0.9"
cranelift-codegen = "0.53" cranelift-codegen = "0.54"
multi_mut = "0.1" multi_mut = "0.1"
either = "1.5" either = "1.5"
typemap = "0.3" typemap = "0.3"

View File

@@ -14,9 +14,9 @@ edition = "2018"
wasmtime-runtime = { path = "../runtime", version = "0.9.0" } wasmtime-runtime = { path = "../runtime", version = "0.9.0" }
wasmtime-environ = { path = "../environ", version = "0.9.0" } wasmtime-environ = { path = "../environ", version = "0.9.0" }
wasmtime-jit = { path = "../jit", version = "0.9.0" } wasmtime-jit = { path = "../jit", version = "0.9.0" }
cranelift-codegen = { version = "0.53", features = ["enable-serde"] } cranelift-codegen = { version = "0.54", features = ["enable-serde"] }
cranelift-entity = { version = "0.53", features = ["enable-serde"] } cranelift-entity = { version = "0.54", features = ["enable-serde"] }
cranelift-wasm = { version = "0.53", features = ["enable-serde"] } cranelift-wasm = { version = "0.54", features = ["enable-serde"] }
target-lexicon = "0.10.0" target-lexicon = "0.10.0"
log = { version = "0.4.8", default-features = false } log = { version = "0.4.8", default-features = false }
libc = "0.2.60" libc = "0.2.60"

View File

@@ -16,9 +16,9 @@ wasmtime-runtime = { path = "../runtime", version = "0.9.0" }
wasmtime-environ = { path = "../environ", version = "0.9.0" } wasmtime-environ = { path = "../environ", version = "0.9.0" }
wasmtime-jit = { path = "../jit", version = "0.9.0" } wasmtime-jit = { path = "../jit", version = "0.9.0" }
wasi-common = { path = "../wasi-common", version = "0.9.0" } wasi-common = { path = "../wasi-common", version = "0.9.0" }
cranelift-codegen = { version = "0.53", features = ["enable-serde"] } cranelift-codegen = { version = "0.54", features = ["enable-serde"] }
cranelift-entity = { version = "0.53", features = ["enable-serde"] } cranelift-entity = { version = "0.54", features = ["enable-serde"] }
cranelift-wasm = { version = "0.53", features = ["enable-serde"] } cranelift-wasm = { version = "0.54", features = ["enable-serde"] }
target-lexicon = "0.10.0" target-lexicon = "0.10.0"
log = { version = "0.4.8", default-features = false } log = { version = "0.4.8", default-features = false }
wig = { path = "../wasi-common/wig", version = "0.9.2" } wig = { path = "../wasi-common/wig", version = "0.9.2" }