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.
27 lines
703 B
Plaintext
27 lines
703 B
Plaintext
test legalizer
|
|
target x86_64 legacy haswell
|
|
|
|
;; Indirect calls with many returns.
|
|
|
|
function %call_indirect_many_rets(i64) {
|
|
; check: ss0 = sret_slot 32
|
|
|
|
sig0 = () -> i64, i64, i64, i64
|
|
; check: sig0 = (i64 sret [%rdi]) -> i64 sret [%rax] fast
|
|
|
|
block0(v0: i64):
|
|
v1, v2, v3, v4 = call_indirect sig0, v0()
|
|
; check: v5 = stack_addr.i64 ss0
|
|
; nextln: v6 = call_indirect sig0, v0(v5)
|
|
; nextln: v7 = load.i64 notrap aligned v6
|
|
; nextln: v1 -> v7
|
|
; nextln: v8 = load.i64 notrap aligned v6+8
|
|
; nextln: v2 -> v8
|
|
; nextln: v9 = load.i64 notrap aligned v6+16
|
|
; nextln: v3 -> v9
|
|
; nextln: v10 = load.i64 notrap aligned v6+24
|
|
; nextln: v4 -> v10
|
|
|
|
return
|
|
}
|