Add test run to cranelift-filetests to allow executing CLIF (#890)
* Add ability to run CLIF IR using `clif-util run [-v] {file}` and add `test run` to cranelift-filetests to allow executing CLIF
This re-factors the compile/execute parts to a FunctionRunner that is shared between cranelift-filetests and clif-util. CLIF can be now be run using `clif-util run` as well as during `clif-util test` for files with a `test run` header. As before, only functions suffixed with a `run` comment are executed. The `run: fn(...) == ...` expression syntax is left for a subsequent change.
This commit is contained in:
committed by
Benjamin Bouvier
parent
276bb5e26d
commit
ff3c44385c
11
cranelift/filetests/filetests/isa/x86/run-const.clif
Normal file
11
cranelift/filetests/filetests/isa/x86/run-const.clif
Normal file
@@ -0,0 +1,11 @@
|
||||
test run
|
||||
|
||||
function %test_compare_i32() -> b1 {
|
||||
ebb0:
|
||||
v0 = iconst.i32 42
|
||||
v1 = iconst.i32 42
|
||||
v2 = icmp eq v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
; run
|
||||
Reference in New Issue
Block a user