|
| 1 | +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. |
| 2 | +;; RUN: wasm-opt %s --post-emscripten --pass-arg=post-emscripten-side-module -S -o - | filecheck %s |
| 3 | + |
| 4 | +;; Checks that the __start_em_asm/__stop_em_asm are preserverd, along with |
| 5 | +;; all __em_js__ exports. |
| 6 | + |
| 7 | +(module |
| 8 | + ;; CHECK: (global $em_asm_start i32 (i32.const 1000)) |
| 9 | + (global $em_asm_start i32 (i32.const 1000)) |
| 10 | + ;; CHECK: (global $em_asm_stop i32 (i32.const 1011)) |
| 11 | + (global $em_asm_stop i32 (i32.const 1011)) |
| 12 | + ;; CHECK: (global $em_js_start i32 (i32.const 2006)) |
| 13 | + (global $em_js_start i32 (i32.const 2006)) |
| 14 | + ;; CHECK: (global $em_js_stop i32 (i32.const 2015)) |
| 15 | + (global $em_js_stop i32 (i32.const 2015)) |
| 16 | + ;; CHECK: (global $__em_js__foo i32 (i32.const 2015)) |
| 17 | + (global $__em_js__foo i32 (i32.const 2015)) |
| 18 | + ;; CHECK: (global $em_lib_deps_start i32 (i32.const 3000)) |
| 19 | + (global $em_lib_deps_start i32 (i32.const 3000)) |
| 20 | + ;; CHECK: (global $em_lib_deps_stop i32 (i32.const 3009)) |
| 21 | + (global $em_lib_deps_stop i32 (i32.const 3009)) |
| 22 | + ;; CHECK: (global $foo_start i32 (i32.const 4000)) |
| 23 | + (global $foo_start i32 (i32.const 4000)) |
| 24 | + ;; CHECK: (global $foo_stop i32 (i32.const 4015)) |
| 25 | + (global $foo_stop i32 (i32.const 4015)) |
| 26 | + (memory 10 10) |
| 27 | + ;; CHECK: (memory $0 10 10) |
| 28 | + |
| 29 | + ;; CHECK: (data $data1 (i32.const 1000) "hello world") |
| 30 | + (data $data1 (i32.const 1000) "hello world") |
| 31 | + ;; CHECK: (data $data2 (i32.const 2000) "hello DELETE ME world") |
| 32 | + (data $data2 (i32.const 2000) "hello DELETE ME world") |
| 33 | + ;; CHECK: (data $data3 (i32.const 3000) "") |
| 34 | + (data $data3 (i32.const 3000) "some deps") |
| 35 | + ;; CHECK: (export "__start_em_asm" (global $em_asm_start)) |
| 36 | + (export "__start_em_asm" (global $em_asm_start)) |
| 37 | + ;; CHECK: (export "__stop_em_asm" (global $em_asm_stop)) |
| 38 | + (export "__stop_em_asm" (global $em_asm_stop)) |
| 39 | + (export "__start_em_js" (global $em_js_start)) |
| 40 | + (export "__stop_em_js" (global $em_js_stop)) |
| 41 | + ;; CHECK: (export "__em_js__foo" (global $__em_js__foo)) |
| 42 | + (export "__em_js__foo" (global $__em_js__foo)) |
| 43 | + (export "__start_em_lib_deps" (global $em_lib_deps_start)) |
| 44 | + (export "__stop_em_lib_deps" (global $em_lib_deps_stop)) |
| 45 | + ;; CHECK: (export "__start_foo" (global $foo_start)) |
| 46 | + (export "__start_foo" (global $foo_start)) |
| 47 | + ;; CHECK: (export "__stop_foo" (global $foo_stop)) |
| 48 | + (export "__stop_foo" (global $foo_stop)) |
| 49 | +) |
0 commit comments