Files
wasmtime/cranelift/filetests/filetests/parser/flags.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

65 lines
988 B
Plaintext

test cat
test verifier
function %iflags(i32) {
block200(v0: i32):
v1 = ifcmp_imm v0, 17
brif eq v1, block201
jump block400
block400:
brif ugt v1, block202
jump block401
block401:
v2 = iconst.i32 34
v3 = ifcmp v0, v2
v4 = trueif eq v3
brnz v4, block202
jump block402
block402:
return
block201:
return
block202:
trap heap_oob
}
; check: v1 = ifcmp_imm v0, 17
; check: brif eq v1, block201
; check: brif ugt v1, block202
; check: v3 = ifcmp.i32 v0, v2
; check: v4 = trueif eq v3
function %fflags(f32) {
block200(v0: f32):
v1 = f32const 0x34.0p0
v2 = ffcmp v0, v1
brff eq v2, block201
jump block400
block400:
brff ord v2, block202
jump block401
block401:
v3 = trueff gt v2
brnz v3, block202
jump block402
block402:
return
block201:
return
block202:
trap heap_oob
}
; check: v2 = ffcmp v0, v1
; check: brff eq v2, block201
; check: brff ord v2, block202
; check: v3 = trueff gt v2