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.
31 lines
676 B
Plaintext
31 lines
676 B
Plaintext
test stack_maps
|
|
set enable_safepoints=true
|
|
target x86_64 legacy
|
|
|
|
;; Incoming args get included in stack maps.
|
|
|
|
function %incoming_args(r64, r64, r64, r64, r64) -> r64 windows_fastcall {
|
|
; check: r64 [32]
|
|
; nextln: ss0 = incoming_arg 8, offset 32
|
|
; nextln: ss1 = incoming_arg 24, offset -24
|
|
; nextln: ss2 = explicit_slot 32, offset -64
|
|
|
|
fn0 = %none()
|
|
; nextln: sig0 = () fast
|
|
; nextln: fn0 = %none sig0
|
|
|
|
block0(v0: r64, v1: r64, v2: r64, v3: r64, v4: r64):
|
|
; check: v4: r64 [ss0]
|
|
|
|
call fn0()
|
|
; check: safepoint v4
|
|
; nextln: call_indirect
|
|
return v4
|
|
}
|
|
|
|
; check: Stack maps:
|
|
; nextln:
|
|
; nextln: safepoint v4
|
|
; nextln: - mapped words: 13
|
|
; nextln: - live: [12]
|