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.
138 lines
2.9 KiB
Plaintext
138 lines
2.9 KiB
Plaintext
test compile
|
|
set opt_level=speed
|
|
set enable_pinned_reg=true
|
|
target x86_64 legacy haswell
|
|
|
|
function u0:0(i32, i32, i32, i64 vmctx) -> i64 uext system_v {
|
|
block0(v0: i32, v1: i32, v2: i32, v3: i64):
|
|
v5 = iconst.i32 -8
|
|
v114 = iconst.i32 0
|
|
v16 = iconst.i32 -8
|
|
v17 = popcnt v16
|
|
v192 = ifcmp_imm v17, -1
|
|
trapif ne v192, user0
|
|
jump block12
|
|
|
|
block12:
|
|
v122 = iconst.i32 0
|
|
v123 = ushr_imm v122, 31
|
|
v124 = iadd v122, v123
|
|
v20 -> v124
|
|
v25 = iconst.i32 -19
|
|
v204 = iconst.i32 0
|
|
v31 -> v204
|
|
v210 = ifcmp_imm v31, -1
|
|
trapif ne v210, user0
|
|
jump block18
|
|
|
|
block18:
|
|
v215 = iconst.i32 0
|
|
jump block19(v215)
|
|
|
|
block19(v32: i32):
|
|
v35 = iconst.i32 0
|
|
v218 = ifcmp_imm v35, -1
|
|
trapif ne v218, user0
|
|
jump block21
|
|
|
|
block21:
|
|
v223 = iconst.i32 0
|
|
jump block22(v223)
|
|
|
|
block22(v36: i32):
|
|
v136 = iconst.i32 0
|
|
v40 -> v136
|
|
v227 = ifcmp_imm v136, -1
|
|
trapif ne v227, user0
|
|
jump block24
|
|
|
|
block24:
|
|
v232 = iconst.i32 0
|
|
jump block25(v232)
|
|
|
|
block25(v41: i32):
|
|
v142 = iconst.i32 0
|
|
v45 -> v142
|
|
v236 = ifcmp_imm v142, -1
|
|
trapif ne v236, user0
|
|
jump block27
|
|
|
|
block27:
|
|
v241 = iconst.i32 0
|
|
jump block28(v241)
|
|
|
|
block28(v46: i32):
|
|
v49 = iconst.i32 0
|
|
v244 = ifcmp_imm v49, -1
|
|
trapif ne v244, user0
|
|
jump block30
|
|
|
|
block30:
|
|
v254 = iconst.i32 0
|
|
v53 -> v254
|
|
v54 = iconst.i32 -23
|
|
v55 = popcnt v54
|
|
v143 = iconst.i32 0x4de9_bd37
|
|
v260, v144 = x86_smulx v55, v143
|
|
v145 = iconst.i32 0
|
|
v146 = sshr_imm v145, 4
|
|
v147 = iconst.i32 0
|
|
v148 = iadd v146, v147
|
|
v57 -> v148
|
|
v58 = ishl v53, v148
|
|
jump block35
|
|
|
|
block35:
|
|
v262 = iconst.i32 0
|
|
v263, v264 = x86_sdivmodx v46, v262, v58
|
|
v59 -> v263
|
|
v270 = iconst.i32 0
|
|
v271, v272 = x86_sdivmodx v41, v270, v59
|
|
v60 -> v271
|
|
v61 = f32const 0.0
|
|
v280 = iconst.i32 0
|
|
v281 = ffcmp v61, v61
|
|
trapff ord v281, user0
|
|
jump block41(v280)
|
|
|
|
block41(v62: i32):
|
|
v157 = iconst.i32 0
|
|
v158 = sshr_imm v157, 4
|
|
v159 = iconst.i32 0
|
|
v160 = iadd v158, v159
|
|
v75 -> v160
|
|
v308 = ifcmp_imm v160, -1
|
|
trapif ne v308, user0
|
|
jump block52
|
|
|
|
block52:
|
|
v87 = iconst.i32 -23
|
|
v88 = iconst.i32 -23
|
|
v89 = popcnt v88
|
|
v161 = iconst.i32 0x4de9_bd37
|
|
v324, v162 = x86_smulx v89, v161
|
|
v163 = isub v162, v89
|
|
v164 = sshr_imm v163, 4
|
|
v165 = iconst.i32 0
|
|
v166 = iadd v164, v165
|
|
v91 -> v166
|
|
v326 = iconst.i32 0
|
|
v327, v328 = x86_sdivmodx v87, v326, v166
|
|
v92 -> v327
|
|
v351 = iconst.i32 0
|
|
v99 -> v351
|
|
v358 = iconst.i32 0
|
|
v359, v360 = x86_sdivmodx v36, v358, v99
|
|
v100 -> v359
|
|
v102 = iconst.i32 0
|
|
v103 = rotr.i32 v32, v102
|
|
v366 = iconst.i32 0
|
|
v367, v368 = x86_sdivmodx v25, v366, v103
|
|
v104 -> v367
|
|
v383 = iconst.i32 0
|
|
v107 -> v383
|
|
v390 = iconst.i32 0
|
|
v391, v392 = x86_sdivmodx v124, v390, v107
|
|
trap user0
|
|
}
|