This PR switches the default backend on x86, for both the `cranelift-codegen` crate and for Wasmtime, to the new (`MachInst`-style, `VCode`-based) backend that has been under development and testing for some time now. The old backend is still available by default in builds with the `old-x86-backend` feature, or by requesting `BackendVariant::Legacy` from the appropriate APIs. As part of that switch, it adds some more runtime-configurable plumbing to the testing infrastructure so that tests can be run using the appropriate backend. `clif-util test` is now capable of parsing a backend selector option from filetests and instantiating the correct backend. CI has been updated so that the old x86 backend continues to run its tests, just as we used to run the new x64 backend separately. At some point, we will remove the old x86 backend entirely, once we are satisfied that the new backend has not caused any unforeseen issues and we do not need to revert.
47 lines
793 B
Plaintext
47 lines
793 B
Plaintext
test run
|
|
target x86_64 legacy
|
|
|
|
function %reverse_bits_zero() -> b1 {
|
|
block0:
|
|
v0 = iconst.i64 0
|
|
v1 = iconcat v0, v0
|
|
v2 = bitrev.i128 v1
|
|
v3 = icmp eq v2, v1
|
|
return v3
|
|
}
|
|
; run
|
|
|
|
function %reverse_bits_one() -> b1 {
|
|
block0:
|
|
v0 = iconst.i64 0
|
|
v1 = iconst.i64 1
|
|
v2 = iconcat v0, v1
|
|
|
|
v3 = bitrev.i128 v2
|
|
|
|
v4 = iconst.i64 0x8000_0000_0000_0000
|
|
v5 = iconst.i64 0
|
|
v6 = iconcat v4, v5
|
|
|
|
v7 = icmp eq v3, v6
|
|
return v7
|
|
}
|
|
; run
|
|
|
|
function %reverse_bits() -> b1 {
|
|
block0:
|
|
v0 = iconst.i64 0x06AD_8667_69EC_41BA
|
|
v1 = iconst.i64 0x6C83_D81A_6E28_83AB
|
|
v2 = iconcat v0, v1
|
|
|
|
v3 = bitrev.i128 v2
|
|
|
|
v4 = iconst.i64 0xD5C11476581BC136
|
|
v5 = iconst.i64 0x5D823796E661B560
|
|
v6 = iconcat v4, v5
|
|
|
|
v7 = icmp eq v3, v6
|
|
return v7
|
|
}
|
|
; run
|