diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/dot_s/alias.s | 27 | ||||
-rw-r--r-- | test/dot_s/alias.wast | 18 |
2 files changed, 36 insertions, 9 deletions
diff --git a/test/dot_s/alias.s b/test/dot_s/alias.s index 85a89a16f..449e33f0e 100644 --- a/test/dot_s/alias.s +++ b/test/dot_s/alias.s @@ -5,9 +5,13 @@ .globl __exit .type __exit,@function __exit: # @__exit - .local i32 + i32.const $push0=, _A + i32.load $push1=, 0($pop0) + i32.const $push2=, ._B + i32.load $push3=, 0($pop2) + i32.add $push4=, $pop1, $pop3 # BB#0: # %entry - return + return $pop4 .endfunc .Lfunc_end0: .size __exit, .Lfunc_end0-__exit @@ -16,10 +20,10 @@ __exit: # @__exit .globl __needs_exit .type __needs_exit,@function __needs_exit: # @__needs_exit - .result i32 + .result i32 # BB#0: # %entry - call __exit_needed@FUNCTION - i32.const $push0=, __exit_needed@FUNCTION + call __exit_needed@FUNCTION + i32.const $push0=, __exit_needed@FUNCTION return $pop0 .endfunc .Lfunc_end1: @@ -29,3 +33,16 @@ __needs_exit: # @__needs_exit .type __exit_needed,@function .hidden __exit_needed __exit_needed = __exit@FUNCTION + + .type .L__unnamed_1,@object + .p2align 4 +.L__unnamed_1: + .int32 1234 + .skip 4 + .int32 2345 + .size .L__unnamed_1, 12 + +_A = .L__unnamed_1 + .size _A, 12 +._B = _A+8 + .size ._B, 4 diff --git a/test/dot_s/alias.wast b/test/dot_s/alias.wast index d1e08e136..6221a2232 100644 --- a/test/dot_s/alias.wast +++ b/test/dot_s/alias.wast @@ -1,5 +1,7 @@ (module - (memory 1) + (memory 1 + (segment 16 "\d2\04\00\00\00\00\00\00)\t\00\00") + ) (export "memory" memory) (type $FUNCSIG$v (func)) (export "__exit" $__exit) @@ -7,8 +9,16 @@ (export "dynCall_v" $dynCall_v) (table $__exit) (func $__exit (type $FUNCSIG$v) - (local $0 i32) - (return) + (return + (i32.add + (i32.load + (i32.const 16) + ) + (i32.load + (i32.const 24) + ) + ) + ) ) (func $__needs_exit (result i32) (call $__exit) @@ -22,4 +32,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 12, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 28, "initializers": [] } |