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.
32 lines
578 B
Plaintext
32 lines
578 B
Plaintext
test compile
|
|
|
|
target x86_64 legacy
|
|
|
|
function u0:0(i64, i8, i8) system_v {
|
|
ss0 = explicit_slot 0
|
|
ss1 = explicit_slot 1
|
|
ss2 = explicit_slot 1
|
|
ss3 = explicit_slot 1
|
|
ss4 = explicit_slot 1
|
|
|
|
block0(v0: i64, v1: i8, v2: i8):
|
|
v3 = stack_addr.i64 ss1
|
|
store v1, v3
|
|
v4 = stack_addr.i64 ss2
|
|
store v2, v4
|
|
v5 = stack_addr.i64 ss3
|
|
v6 = stack_addr.i64 ss4
|
|
jump block1
|
|
|
|
block1:
|
|
v7 = load.i8 v3
|
|
store v7, v5
|
|
v8 = load.i8 v4
|
|
store v8, v6
|
|
v9 = load.i8 v5
|
|
v10 = load.i8 v6
|
|
v11 = imul v9, v10
|
|
store v11, v0
|
|
return
|
|
}
|