-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move all tests out of
cranelift-wasm
(#8147)
* Move remaining `*.wat` tests out of cranelift-wasm/wasmtests Move these up to Wasmtime's misc testsuite to get translated and instantiated by Wasmtime. Note that the max-function-index-in-name-section test was removed here as that's tested by the support added in #3509. * Remove cranelift-wasm test for name section This is pretty thoroughly tested elsewhere in Wasmtime that we respect the name section, for example many of the trap tests assert that the name of the function comes from the text format. * Move reachability tests out of cranelift-wasm Instead add them to the disassembly test suite to ensure we don't generate dead code. Additionally this has a lot of coverage via fuzzing too. * Move more tests out of cranelift-wasm Move them into `tests/disas` so we can easily see the CLIF.
- Loading branch information
1 parent
375a3bd
commit 27153d0
Showing
10 changed files
with
273 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-381 Bytes
cranelift/wasm/wasmtests/issue-1306-name-section-with-u32-max-function-index.wasm
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
;;! target = "x86_64" | ||
|
||
(module | ||
(func (param i32) | ||
(loop | ||
(block | ||
local.get 0 | ||
br_if 0 | ||
br 1))) | ||
|
||
(func (param i32) | ||
(loop | ||
(block | ||
br 1 | ||
call $empty))) | ||
|
||
(func $empty) | ||
|
||
(func (param i32) (result i32) | ||
i32.const 1 | ||
return | ||
i32.const 42) | ||
) | ||
;; function u0:0(i64 vmctx, i64, i32) fast { | ||
;; gv0 = vmctx | ||
;; gv1 = load.i64 notrap aligned readonly gv0+8 | ||
;; gv2 = load.i64 notrap aligned gv1 | ||
;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext system_v | ||
;; sig1 = (i64 vmctx, i32 uext) -> i32 uext system_v | ||
;; stack_limit = gv2 | ||
;; | ||
;; block0(v0: i64, v1: i64, v2: i32): | ||
;; v3 -> v2 | ||
;; @0023 jump block2 | ||
;; | ||
;; block2: | ||
;; @0029 brif.i32 v3, block4, block5 | ||
;; | ||
;; block5: | ||
;; @002b jump block2 | ||
;; | ||
;; block4: | ||
;; @002e jump block3 | ||
;; | ||
;; block3: | ||
;; @002f jump block1 | ||
;; | ||
;; block1: | ||
;; @002f return | ||
;; } | ||
;; | ||
;; function u0:1(i64 vmctx, i64, i32) fast { | ||
;; gv0 = vmctx | ||
;; gv1 = load.i64 notrap aligned readonly gv0+8 | ||
;; gv2 = load.i64 notrap aligned gv1 | ||
;; stack_limit = gv2 | ||
;; | ||
;; block0(v0: i64, v1: i64, v2: i32): | ||
;; @0032 jump block2 | ||
;; | ||
;; block2: | ||
;; @0036 jump block2 | ||
;; } | ||
;; | ||
;; function u0:2(i64 vmctx, i64) fast { | ||
;; gv0 = vmctx | ||
;; gv1 = load.i64 notrap aligned readonly gv0+8 | ||
;; gv2 = load.i64 notrap aligned gv1 | ||
;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext system_v | ||
;; sig1 = (i64 vmctx, i32 uext) -> i32 uext system_v | ||
;; stack_limit = gv2 | ||
;; | ||
;; block0(v0: i64, v1: i64): | ||
;; @003f jump block1 | ||
;; | ||
;; block1: | ||
;; @003f return | ||
;; } | ||
;; | ||
;; function u0:3(i64 vmctx, i64, i32) -> i32 fast { | ||
;; gv0 = vmctx | ||
;; gv1 = load.i64 notrap aligned readonly gv0+8 | ||
;; gv2 = load.i64 notrap aligned gv1 | ||
;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext system_v | ||
;; sig1 = (i64 vmctx, i32 uext) -> i32 uext system_v | ||
;; stack_limit = gv2 | ||
;; | ||
;; block0(v0: i64, v1: i64, v2: i32): | ||
;; @0042 v4 = iconst.i32 1 | ||
;; @0044 return v4 ; v4 = 1 | ||
;; } |
Oops, something went wrong.