Browse Source

Update spec tests (#2690)

* Update wasm-tools crates

* Update Wasm SIMD spec tests

* Invert 'experimental_x64_should_panic' logic

By doing this, it is easier to see which spec tests currently panic. The new tests correspond to recently-added instructions.

* Fix: ignore new spec tests for all backends
pull/2697/head
Andrew Brown 4 years ago
committed by GitHub
parent
commit
44e76fe9c0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 34
      Cargo.lock
  2. 6
      Cargo.toml
  3. 81
      build.rs
  4. 2
      cranelift/Cargo.toml
  5. 2
      cranelift/codegen/Cargo.toml
  6. 2
      cranelift/peepmatic/Cargo.toml
  7. 2
      cranelift/peepmatic/crates/fuzzing/Cargo.toml
  8. 2
      cranelift/peepmatic/crates/runtime/Cargo.toml
  9. 2
      cranelift/peepmatic/crates/souper/Cargo.toml
  10. 2
      cranelift/peepmatic/crates/test-operator/Cargo.toml
  11. 4
      cranelift/wasm/Cargo.toml
  12. 24
      cranelift/wasm/src/code_translator.rs
  13. 2
      crates/c-api/Cargo.toml
  14. 2
      crates/cranelift/Cargo.toml
  15. 2
      crates/debug/Cargo.toml
  16. 2
      crates/environ/Cargo.toml
  17. 6
      crates/fuzzing/Cargo.toml
  18. 2
      crates/jit/Cargo.toml
  19. 4
      crates/lightbeam/Cargo.toml
  20. 2
      crates/lightbeam/wasmtime/Cargo.toml
  21. 2
      crates/test-programs/Cargo.toml
  22. 4
      crates/wasmtime/Cargo.toml
  23. 2
      crates/wast/Cargo.toml
  24. 2
      tests/spec_testsuite

34
Cargo.lock

@ -536,7 +536,7 @@ dependencies = [
"souper-ir",
"target-lexicon",
"thiserror",
"wast 34.0.0",
"wast 35.0.0",
]
[[package]]
@ -1804,7 +1804,7 @@ dependencies = [
"peepmatic-test-operator",
"peepmatic-traits",
"serde",
"wast 34.0.0",
"wast 35.0.0",
"z3",
]
@ -1832,7 +1832,7 @@ dependencies = [
"peepmatic-traits",
"rand 0.8.3",
"serde",
"wast 34.0.0",
"wast 35.0.0",
]
[[package]]
@ -1857,7 +1857,7 @@ dependencies = [
"serde",
"serde_test",
"thiserror",
"wast 34.0.0",
"wast 35.0.0",
]
[[package]]
@ -1869,7 +1869,7 @@ dependencies = [
"peepmatic",
"peepmatic-test-operator",
"souper-ir",
"wast 34.0.0",
"wast 35.0.0",
]
[[package]]
@ -1890,7 +1890,7 @@ version = "0.70.0"
dependencies = [
"peepmatic-traits",
"serde",
"wast 34.0.0",
"wast 35.0.0",
]
[[package]]
@ -3100,15 +3100,15 @@ dependencies = [
[[package]]
name = "wasmparser"
version = "0.75.0"
version = "0.76.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4580b6be7329cfc3277131fc8363044990effb57b3ce93ef304ca70ad4339c64"
checksum = "755a9a4afe3f6cccbbe6d7e965eef44cf260b001f93e547eba84255c1d0187d8"
[[package]]
name = "wasmprinter"
version = "0.2.23"
version = "0.2.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd96f124341fa6774d6092ec4049bc062aea4ab03b52e14b5c96f3667bd36961"
checksum = "fc04e945b98318820984d1bdc9132987cb628fc43ee2b95e21fdd751341e5686"
dependencies = [
"anyhow",
"wasmparser",
@ -3245,7 +3245,7 @@ dependencies = [
"wasmtime-wasi-crypto",
"wasmtime-wasi-nn",
"wasmtime-wast",
"wast 34.0.0",
"wast 35.0.0",
"wat",
]
@ -3492,7 +3492,7 @@ version = "0.23.0"
dependencies = [
"anyhow",
"wasmtime",
"wast 34.0.0",
"wast 35.0.0",
]
[[package]]
@ -3528,20 +3528,20 @@ dependencies = [
[[package]]
name = "wast"
version = "34.0.0"
version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3de71ea922e46a60d0bde4b27ebf24ab7c4991006fd5de23ce9c58e129b3ab3c"
checksum = "db5ae96da18bb5926341516fd409b5a8ce4e4714da7f0a1063d3b20ac9f9a1e1"
dependencies = [
"leb128",
]
[[package]]
name = "wat"
version = "1.0.35"
version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "474403335b9a90b21120ab8131dd888f0a8d041c2d365ab960feddfe5a73c4b6"
checksum = "0b0fa059022c5dabe129f02b429d67086400deb8277f89c975555dacc1dadbcc"
dependencies = [
"wast 34.0.0",
"wast 35.0.0",
]
[[package]]

6
Cargo.toml

@ -40,12 +40,12 @@ anyhow = "1.0.19"
target-lexicon = { version = "0.11.0", default-features = false }
pretty_env_logger = "0.4.0"
file-per-thread-logger = "0.1.1"
wat = "1.0.33"
wat = "1.0.36"
libc = "0.2.60"
log = "0.4.8"
rayon = "1.2.1"
humantime = "2.0.0"
wasmparser = "0.75.0"
wasmparser = "0.76.0"
cap-std = "0.13"
[dev-dependencies]
@ -57,7 +57,7 @@ test-programs = { path = "crates/test-programs" }
wasmtime-fuzzing = { path = "crates/fuzzing" }
wasmtime-runtime = { path = "crates/runtime" }
tracing-subscriber = "0.2.16"
wast = "34.0.0"
wast = "35.0.0"
[build-dependencies]
anyhow = "1.0.19"

81
build.rs

@ -182,44 +182,27 @@ fn experimental_x64_should_panic(testsuite: &str, testname: &str, strategy: &str
}
match (testsuite, testname) {
("simd", "simd_address") => return false,
("simd", "simd_align") => return false,
("simd", "simd_bitwise") => return false,
("simd", "simd_bit_shift") => return false,
("simd", "simd_boolean") => return false,
("simd", "simd_const") => return false,
("simd", "simd_i8x16_arith") => return false,
("simd", "simd_i8x16_arith2") => return false,
("simd", "simd_i8x16_cmp") => return false,
("simd", "simd_i8x16_sat_arith") => return false,
("simd", "simd_i16x8_arith") => return false,
("simd", "simd_i16x8_arith2") => return false,
("simd", "simd_i16x8_cmp") => return false,
("simd", "simd_i16x8_sat_arith") => return false,
("simd", "simd_i32x4_arith") => return false,
("simd", "simd_i32x4_arith2") => return false,
("simd", "simd_i32x4_cmp") => return false,
("simd", "simd_i32x4_dot_i16x8") => return false,
("simd", "simd_i64x2_arith") => return false,
("simd", "simd_f32x4") => return false,
("simd", "simd_f32x4_arith") => return false,
("simd", "simd_f32x4_cmp") => return false,
("simd", "simd_f32x4_pmin_pmax") => return false,
("simd", "simd_f64x2") => return false,
("simd", "simd_f64x2_arith") => return false,
("simd", "simd_f64x2_cmp") => return false,
("simd", "simd_f64x2_pmin_pmax") => return false,
("simd", "simd_lane") => return false,
("simd", "simd_load") => return false,
("simd", "simd_load_extend") => return false,
("simd", "simd_load_splat") => return false,
("simd", "simd_load_zero") => return false,
("simd", "simd_splat") => return false,
("simd", "simd_store") => return false,
("simd", "simd_conversions") => return false,
("simd", "simd_f32x4_rounding") => return false,
("simd", "simd_f64x2_rounding") => return false,
("simd", _) => return true,
("simd", "simd_i64x2_cmp") => return true,
("simd", "simd_i8x16_arith2") => return true, // Unsupported feature: proposed simd operator I8x16Popcnt
("simd", "simd_i64x2_arith2") => return true, // Unsupported feature: proposed simd operator I64x2Abs
("simd", "simd_conversions") => return true, // unknown operator or unexpected token: tests/spec_testsuite/proposals/simd/simd_conversions.wast:724:6
("simd", "simd_i16x8_extadd_pairwise_i8x16") => return true,
("simd", "simd_i16x8_extmul_i8x16") => return true,
("simd", "simd_i16x8_q15mulr_sat_s") => return true,
("simd", "simd_i32x4_extadd_pairwise_i16x8") => return true,
("simd", "simd_i32x4_extmul_i16x8") => return true,
("simd", "simd_i32x4_trunc_sat_f64x2") => return true,
("simd", "simd_i64x2_extmul_i32x4") => return true,
("simd", "simd_int_to_int_extend") => return true,
("simd", "simd_load16_lane") => return true,
("simd", "simd_load32_lane") => return true,
("simd", "simd_load64_lane") => return true,
("simd", "simd_load8_lane") => return true,
("simd", "simd_store16_lane") => return true,
("simd", "simd_store32_lane") => return true,
("simd", "simd_store64_lane") => return true,
("simd", "simd_store8_lane") => return true,
("simd", _) => return false,
_ => {}
}
false
@ -247,6 +230,28 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
// instruction names.
("simd", "simd_boolean") | ("simd", "simd_lane") => return true,
// These are new instructions that are not really implemented in any backend.
("simd", "simd_i64x2_cmp")
| ("simd", "simd_i8x16_arith2")
| ("simd", "simd_i64x2_arith2")
| ("simd", "simd_conversions")
| ("simd", "simd_i16x8_extadd_pairwise_i8x16")
| ("simd", "simd_i16x8_extmul_i8x16")
| ("simd", "simd_i16x8_q15mulr_sat_s")
| ("simd", "simd_i32x4_extadd_pairwise_i16x8")
| ("simd", "simd_i32x4_extmul_i16x8")
| ("simd", "simd_i32x4_trunc_sat_f64x2")
| ("simd", "simd_i64x2_extmul_i32x4")
| ("simd", "simd_int_to_int_extend")
| ("simd", "simd_load16_lane")
| ("simd", "simd_load32_lane")
| ("simd", "simd_load64_lane")
| ("simd", "simd_load8_lane")
| ("simd", "simd_store16_lane")
| ("simd", "simd_store32_lane")
| ("simd", "simd_store64_lane")
| ("simd", "simd_store8_lane") => return true,
// These are only implemented on aarch64 and x64.
("simd", "simd_f32x4_pmin_pmax")
| ("simd", "simd_f64x2_pmin_pmax")

2
cranelift/Cargo.toml

@ -33,7 +33,7 @@ filecheck = "0.5.0"
log = "0.4.8"
termcolor = "1.1.2"
capstone = { version = "0.7.0", optional = true }
wat = { version = "1.0.18", optional = true }
wat = { version = "1.0.36", optional = true }
target-lexicon = { version = "0.11", features = ["std"] }
peepmatic-souper = { path = "./peepmatic/crates/souper", version = "0.70.0", optional = true }
pretty_env_logger = "0.4.0"

2
cranelift/codegen/Cargo.toml

@ -30,7 +30,7 @@ peepmatic-traits = { path = "../peepmatic/crates/traits", optional = true, versi
peepmatic-runtime = { path = "../peepmatic/crates/runtime", optional = true, version = "0.70.0" }
regalloc = { version = "0.0.31" }
souper-ir = { version = "2.1.0", optional = true }
wast = { version = "34.0.0", optional = true }
wast = { version = "35.0.0", optional = true }
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
# Please don't add any unless they are essential to the task of creating binary
# machine code. Integration tests that need external dependencies can be

2
cranelift/peepmatic/Cargo.toml

@ -15,7 +15,7 @@ peepmatic-macro = { version = "0.70.0", path = "crates/macro" }
peepmatic-runtime = { version = "0.70.0", path = "crates/runtime", features = ["construct"] }
peepmatic-traits = { version = "0.70.0", path = "crates/traits" }
serde = { version = "1.0.105", features = ["derive"] }
wast = "34.0.0"
wast = "35.0.0"
z3 = { version = "0.7.1", features = ["static-link-z3"] }
[dev-dependencies]

2
cranelift/peepmatic/crates/fuzzing/Cargo.toml

@ -21,4 +21,4 @@ peepmatic-test-operator = { path = "../test-operator" }
peepmatic-traits = { path = "../traits" }
rand = { version = "0.8.3", features = ["small_rng"] }
serde = "1.0.106"
wast = "34.0.0"
wast = "35.0.0"

2
cranelift/peepmatic/crates/runtime/Cargo.toml

@ -16,7 +16,7 @@ peepmatic-automata = { version = "0.70.0", path = "../automata", features = ["se
peepmatic-traits = { version = "0.70.0", path = "../traits" }
serde = { version = "1.0.105", features = ["derive"] }
thiserror = "1.0.15"
wast = { version = "34.0.0", optional = true }
wast = { version = "35.0.0", optional = true }
[dev-dependencies]
peepmatic-test-operator = { version = "0.70.0", path = "../test-operator" }

2
cranelift/peepmatic/crates/souper/Cargo.toml

@ -16,4 +16,4 @@ log = "0.4.8"
[dev-dependencies]
peepmatic = { path = "../..", version = "0.70.0" }
peepmatic-test-operator = { version = "0.70.0", path = "../test-operator" }
wast = "34.0.0"
wast = "35.0.0"

2
cranelift/peepmatic/crates/test-operator/Cargo.toml

@ -11,4 +11,4 @@ edition = "2018"
[dependencies]
peepmatic-traits = { version = "0.70.0", path = "../traits" }
serde = { version = "1.0.105", features = ["derive"] }
wast = "34.0.0"
wast = "35.0.0"

4
cranelift/wasm/Cargo.toml

@ -12,7 +12,7 @@ keywords = ["webassembly", "wasm"]
edition = "2018"
[dependencies]
wasmparser = { version = "0.75", default-features = false }
wasmparser = { version = "0.76", default-features = false }
cranelift-codegen = { path = "../codegen", version = "0.70.0", default-features = false }
cranelift-entity = { path = "../entity", version = "0.70.0" }
cranelift-frontend = { path = "../frontend", version = "0.70.0", default-features = false }
@ -24,7 +24,7 @@ smallvec = "1.6.1"
thiserror = "1.0.4"
[dev-dependencies]
wat = "1.0.23"
wat = "1.0.36"
target-lexicon = "0.11"
# Enable the riscv feature for cranelift-codegen, as some tests require it
cranelift-codegen = { path = "../codegen", version = "0.70.0", default-features = false, features = ["riscv"] }

24
cranelift/wasm/src/code_translator.rs

@ -1769,35 +1769,35 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
let (a, b) = pop2_with_bitcast(state, I32X4, builder);
state.push1(builder.ins().unarrow(a, b))
}
Operator::I16x8WidenLowI8x16S => {
Operator::I16x8ExtendLowI8x16S => {
let a = pop1_with_bitcast(state, I8X16, builder);
state.push1(builder.ins().swiden_low(a))
}
Operator::I16x8WidenHighI8x16S => {
Operator::I16x8ExtendHighI8x16S => {
let a = pop1_with_bitcast(state, I8X16, builder);
state.push1(builder.ins().swiden_high(a))
}
Operator::I16x8WidenLowI8x16U => {
Operator::I16x8ExtendLowI8x16U => {
let a = pop1_with_bitcast(state, I8X16, builder);
state.push1(builder.ins().uwiden_low(a))
}
Operator::I16x8WidenHighI8x16U => {
Operator::I16x8ExtendHighI8x16U => {
let a = pop1_with_bitcast(state, I8X16, builder);
state.push1(builder.ins().uwiden_high(a))
}
Operator::I32x4WidenLowI16x8S => {
Operator::I32x4ExtendLowI16x8S => {
let a = pop1_with_bitcast(state, I16X8, builder);
state.push1(builder.ins().swiden_low(a))
}
Operator::I32x4WidenHighI16x8S => {
Operator::I32x4ExtendHighI16x8S => {
let a = pop1_with_bitcast(state, I16X8, builder);
state.push1(builder.ins().swiden_high(a))
}
Operator::I32x4WidenLowI16x8U => {
Operator::I32x4ExtendLowI16x8U => {
let a = pop1_with_bitcast(state, I16X8, builder);
state.push1(builder.ins().uwiden_low(a))
}
Operator::I32x4WidenHighI16x8U => {
Operator::I32x4ExtendHighI16x8U => {
let a = pop1_with_bitcast(state, I16X8, builder);
state.push1(builder.ins().uwiden_high(a))
}
@ -1827,10 +1827,10 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
state.push1(builder.ins().widening_pairwise_dot_product_s(a, b));
}
Operator::I64x2Bitmask
| Operator::I64x2WidenLowI32x4S
| Operator::I64x2WidenHighI32x4S
| Operator::I64x2WidenLowI32x4U
| Operator::I64x2WidenHighI32x4U
| Operator::I64x2ExtendLowI32x4S
| Operator::I64x2ExtendHighI32x4S
| Operator::I64x2ExtendLowI32x4U
| Operator::I64x2ExtendHighI32x4U
| Operator::V128Load8Lane { .. }
| Operator::V128Load16Lane { .. }
| Operator::V128Load32Lane { .. }

2
crates/c-api/Cargo.toml

@ -24,7 +24,7 @@ wasmtime = { path = "../wasmtime", default-features = false }
wasmtime-c-api-macros = { path = "macros" }
# Optional dependency for the `wat2wasm` API
wat = { version = "1.0.23", optional = true }
wat = { version = "1.0.36", optional = true }
# Optional dependencies for the `wasi` feature
wasi-common = { path = "../wasi-common", optional = true }

2
crates/cranelift/Cargo.toml

@ -17,4 +17,4 @@ cranelift-wasm = { path = "../../cranelift/wasm", version = "0.70.0" }
cranelift-codegen = { path = "../../cranelift/codegen", version = "0.70.0" }
cranelift-frontend = { path = "../../cranelift/frontend", version = "0.70.0" }
cranelift-entity = { path = "../../cranelift/entity", version = "0.70.0" }
wasmparser = "0.75.0"
wasmparser = "0.76.0"

2
crates/debug/Cargo.toml

@ -13,7 +13,7 @@ edition = "2018"
[dependencies]
gimli = "0.23.0"
wasmparser = "0.75"
wasmparser = "0.76"
object = { version = "0.23.0", default-features = false, features = ["read_core", "elf", "write"] }
wasmtime-environ = { path = "../environ", version = "0.23.0" }
target-lexicon = { version = "0.11.0", default-features = false }

2
crates/environ/Cargo.toml

@ -16,7 +16,7 @@ anyhow = "1.0"
cranelift-codegen = { path = "../../cranelift/codegen", version = "0.70.0", features = ["enable-serde"] }
cranelift-entity = { path = "../../cranelift/entity", version = "0.70.0", features = ["enable-serde"] }
cranelift-wasm = { path = "../../cranelift/wasm", version = "0.70.0", features = ["enable-serde"] }
wasmparser = "0.75"
wasmparser = "0.76"
indexmap = { version = "1.0.2", features = ["serde-1"] }
thiserror = "1.0.4"
serde = { version = "1.0.94", features = ["derive"] }

6
crates/fuzzing/Cargo.toml

@ -13,8 +13,8 @@ arbitrary = { version = "1.0.0", features = ["derive"] }
env_logger = "0.8.1"
log = "0.4.8"
rayon = "1.2.1"
wasmparser = "0.75"
wasmprinter = "0.2.23"
wasmparser = "0.76"
wasmprinter = "0.2.24"
wasmtime = { path = "../wasmtime" }
wasmtime-wast = { path = "../wast" }
wasm-encoder = "0.4"
@ -22,7 +22,7 @@ wasm-smith = "0.4.0"
wasmi = "0.7.0"
[dev-dependencies]
wat = "1.0.28"
wat = "1.0.36"
[features]
experimental_x64 = ["wasmtime/experimental_x64"]

2
crates/jit/Cargo.toml

@ -28,7 +28,7 @@ rayon = { version = "1.0", optional = true }
region = "2.1.0"
thiserror = "1.0.4"
target-lexicon = { version = "0.11.0", default-features = false }
wasmparser = "0.75"
wasmparser = "0.76"
more-asserts = "0.2.1"
anyhow = "1.0"
cfg-if = "1.0"

4
crates/lightbeam/Cargo.toml

@ -24,11 +24,11 @@ more-asserts = "0.2.1"
smallvec = "1.6.1"
thiserror = "1.0.9"
typemap = "0.3"
wasmparser = "0.75"
wasmparser = "0.76"
[dev-dependencies]
lazy_static = "1.2"
wat = "1.0.23"
wat = "1.0.36"
quickcheck = "1.0.0"
anyhow = "1.0"

2
crates/lightbeam/wasmtime/Cargo.toml

@ -13,6 +13,6 @@ edition = "2018"
[dependencies]
lightbeam = { path = "..", version = "0.23.0" }
wasmparser = "0.75"
wasmparser = "0.76"
cranelift-codegen = { path = "../../../cranelift/codegen", version = "0.70.0" }
wasmtime-environ = { path = "../../environ", version = "0.23.0" }

2
crates/test-programs/Cargo.toml

@ -20,7 +20,7 @@ pretty_env_logger = "0.4.0"
tempfile = "3.1.0"
os_pipe = "0.9"
anyhow = "1.0.19"
wat = "1.0.23"
wat = "1.0.36"
cap-std = "0.13"
[features]

4
crates/wasmtime/Cargo.toml

@ -20,7 +20,7 @@ wasmtime-cache = { path = "../cache", version = "0.23.0", optional = true }
wasmtime-profiling = { path = "../profiling", version = "0.23.0" }
wasmtime-fiber = { path = "../fiber", version = "0.23.0", optional = true }
target-lexicon = { version = "0.11.0", default-features = false }
wasmparser = "0.75"
wasmparser = "0.76"
anyhow = "1.0.19"
region = "2.2.0"
libc = "0.2"
@ -29,7 +29,7 @@ backtrace = "0.3.42"
rustc-demangle = "0.1.16"
cpp_demangle = "0.3.2"
log = "0.4.8"
wat = { version = "1.0.35", optional = true }
wat = { version = "1.0.36", optional = true }
smallvec = "1.6.1"
serde = { version = "1.0.94", features = ["derive"] }
bincode = "1.2.1"

2
crates/wast/Cargo.toml

@ -13,7 +13,7 @@ edition = "2018"
[dependencies]
anyhow = "1.0.19"
wasmtime = { path = "../wasmtime", version = "0.23.0", default-features = false }
wast = "34.0.0"
wast = "35.0.0"
[badges]
maintenance = { status = "actively-developed" }

2
tests/spec_testsuite

@ -1 +1 @@
Subproject commit 35c50bf6fbb002cfdc1227b0af731bdcaf877714
Subproject commit 9994915e0cca8b42a16c577e4c85491822367dde
Loading…
Cancel
Save