Files
wasmtime/cranelift/filetests/filetests/regalloc/iterate.clif
Dan Gohman fb0b9e3ae6 Change proc_exit to unwind the stack rather than exiting the host process. (#1646)
* Remove Cranelift's OutOfBounds trap, which is no longer used.

* Change proc_exit to unwind instead of exit the host process.

This implements the semantics in https://github.com/WebAssembly/WASI/pull/235.

Fixes #783.
Fixes #993.

* Fix exit-status tests on Windows.

* Revert the wiggle changes and re-introduce the wasi-common implementations.

* Move `wasi_proc_exit` into the wasmtime-wasi crate.

* Revert the spec_testsuite change.

* Remove the old proc_exit implementations.

* Make `TrapReason` an implementation detail.

* Allow exit status 2 on Windows too.

* Fix a documentation link.

* Really fix a documentation link.
2020-05-13 15:59:43 -07:00

165 lines
3.4 KiB
Plaintext

test regalloc
target x86_64 haswell
function u0:9(i64 [%rdi], f32 [%xmm0], f64 [%xmm1], i32 [%rsi], i32 [%rdx], i64 vmctx [%r14]) -> i64 [%rax] baldrdash_system_v {
block0(v0: i64, v1: f32, v2: f64, v3: i32, v4: i32, v5: i64):
v32 = iconst.i32 0
v6 = bitcast.f32 v32
v7 = iconst.i64 0
v33 = iconst.i64 0
v8 = bitcast.f64 v33
v34 = iconst.i32 0xbe99_999a
v9 = bitcast.f32 v34
v10 = iconst.i32 40
v11 = iconst.i32 -7
v35 = iconst.i32 0x40b0_0000
v12 = bitcast.f32 v35
v13 = iconst.i64 6
v36 = iconst.i64 0x4020_0000_0000_0000
v14 = bitcast.f64 v36
v44 = iconst.i64 0
v37 = icmp slt v0, v44
brnz v37, block2
jump block11
block11:
v38 = fcvt_from_sint.f64 v0
jump block3(v38)
block2:
v45 = iconst.i32 1
v39 = ushr.i64 v0, v45
v40 = band_imm.i64 v0, 1
v41 = bor v39, v40
v42 = fcvt_from_sint.f64 v41
v43 = fadd v42, v42
jump block3(v43)
block3(v15: f64):
v16 = fpromote.f64 v9
v46 = uextend.i64 v10
v17 = fcvt_from_sint.f64 v46
v18 = fcvt_from_sint.f64 v11
v19 = fpromote.f64 v12
v54 = iconst.i64 0
v47 = icmp.i64 slt v13, v54
brnz v47, block4
jump block12
block12:
v48 = fcvt_from_sint.f64 v13
jump block5(v48)
block4:
v55 = iconst.i32 1
v49 = ushr.i64 v13, v55
v50 = band_imm.i64 v13, 1
v51 = bor v49, v50
v52 = fcvt_from_sint.f64 v51
v53 = fadd v52, v52
jump block5(v53)
block5(v20: f64):
v63 = iconst.i64 0
v56 = icmp.i64 slt v7, v63
brnz v56, block6
jump block13
block13:
v57 = fcvt_from_sint.f64 v7
jump block7(v57)
block6:
v64 = iconst.i32 1
v58 = ushr.i64 v7, v64
v59 = band_imm.i64 v7, 1
v60 = bor v58, v59
v61 = fcvt_from_sint.f64 v60
v62 = fadd v61, v61
jump block7(v62)
block7(v21: f64):
v22 = fadd v21, v14
v23 = fadd.f64 v20, v22
v24 = fadd.f64 v19, v23
v25 = fadd.f64 v18, v24
v26 = fadd.f64 v17, v25
v27 = fadd.f64 v2, v26
v28 = fadd.f64 v16, v27
v29 = fadd.f64 v15, v28
v30 = x86_cvtt2si.i64 v29
v69 = iconst.i64 0x8000_0000_0000_0000
v65 = icmp ne v30, v69
brnz v65, block8
jump block15
block15:
v66 = fcmp uno v29, v29
brz v66, block9
jump block16
block16:
trap bad_toint
block9:
v70 = iconst.i64 0xc3e0_0000_0000_0000
v67 = bitcast.f64 v70
v68 = fcmp gt v67, v29
brz v68, block10
jump block17
block17:
trap int_ovf
block10:
jump block8
block8:
jump block1(v30)
block1(v31: i64):
return v31
}
function u0:26(i64 vmctx [%r14]) -> i64 [%rax] baldrdash_system_v {
gv1 = vmctx
gv0 = iadd_imm.i64 gv1, 48
sig0 = (i32 [%rdi], i64 [%rsi], i64 vmctx [%r14], i64 sigid [%rbx]) -> i64 [%rax] baldrdash_system_v
block0(v0: i64):
v1 = iconst.i32 32
v2 = iconst.i64 64
v3 = iconst.i32 9
v4 = iconst.i64 1063
v5 = iadd_imm v0, 48
v6 = load.i32 v5
v7 = icmp uge v3, v6
; If we're unlucky, there are no ABCD registers available for v7 at this branch.
brz v7, block2
jump block4
block4:
trap heap_oob
block2:
v8 = load.i64 v5+8
v9 = uextend.i64 v3
v16 = iconst.i64 16
v10 = imul v9, v16
v11 = iadd v8, v10
v12 = load.i64 v11
brnz v12, block3
jump block5
block5:
trap icall_null
block3:
v13 = load.i64 v11+8
v14 = call_indirect.i64 sig0, v12(v1, v2, v13, v4)
jump block1(v14)
block1(v15: i64):
return v15
}