diff options
Diffstat (limited to 'test/debugInfo.fromasm.clamp')
-rw-r--r-- | test/debugInfo.fromasm.clamp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/test/debugInfo.fromasm.clamp b/test/debugInfo.fromasm.clamp new file mode 100644 index 000000000..f19f244f5 --- /dev/null +++ b/test/debugInfo.fromasm.clamp @@ -0,0 +1,61 @@ +(module + (type $FUNCSIG$vii (func (param i32 i32))) + (import "env" "memory" (memory $0 256 256)) + (import "env" "table" (table 0 0 anyfunc)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) + (data (get_global $memoryBase) "debugInfo.asm.js") + (export "add" (func $add)) + (export "ret" (func $ret)) + (export "opts" (func $opts)) + (func $add (param $0 i32) (param $1 i32) (result i32) + (i32.add + (get_local $1) + (get_local $1) + ) + ) + (func $ret (param $0 i32) (result i32) + (i32.add + (i32.shl + (get_local $0) + (i32.const 1) + ) + (i32.const 1) + ) + ) + (func $i32s-rem (param $0 i32) (param $1 i32) (result i32) + (if i32 + (get_local $1) + (i32.rem_s + (get_local $0) + (get_local $1) + ) + (i32.const 0) + ) + ) + (func $opts (param $0 i32) (param $1 i32) (result i32) + ;; even-opted.cpp:2 + (set_local $1 + (i32.shr_s + (get_local $1) + (tee_local $0 + (i32.add + (get_local $0) + (get_local $1) + ) + ) + ) + ) + ;; even-opted.cpp:3 + (set_local $0 + (call $i32s-rem + (get_local $0) + (get_local $1) + ) + ) + (i32.add + (get_local $0) + (get_local $1) + ) + ) +) |