summaryrefslogtreecommitdiff
path: root/test/min.fromasm.clamp
diff options
context:
space:
mode:
Diffstat (limited to 'test/min.fromasm.clamp')
-rw-r--r--test/min.fromasm.clamp68
1 files changed, 68 insertions, 0 deletions
diff --git a/test/min.fromasm.clamp b/test/min.fromasm.clamp
new file mode 100644
index 000000000..8f4ccbf4b
--- /dev/null
+++ b/test/min.fromasm.clamp
@@ -0,0 +1,68 @@
+(module
+ (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))
+ (global $M (mut i32) (i32.const 0))
+ (data (get_global $memoryBase) "min.asm.js")
+ (export "floats" (func $legalstub$floats))
+ (export "getTempRet0" (func $ub))
+ (export "neg" (func $legalstub$neg))
+ (export "bitcasts" (func $legalstub$bitcasts))
+ (export "ctzzzz" (func $ctzzzz))
+ (func $floats (param $0 f32) (result f32)
+ (local $1 f32)
+ (f32.add
+ (get_local $1)
+ (get_local $0)
+ )
+ )
+ (func $neg (param $0 i32) (param $1 i32) (result f32)
+ (i32.store
+ (get_local $0)
+ (get_local $1)
+ )
+ (f32.neg
+ (f32.load
+ (get_local $0)
+ )
+ )
+ )
+ (func $bitcasts (param $0 i32) (param $1 f32)
+ (nop)
+ )
+ (func $ctzzzz (result i32)
+ (i32.const 2)
+ )
+ (func $ub (result i32)
+ (drop
+ (call $ub)
+ )
+ (get_global $M)
+ )
+ (func $legalstub$floats (param $0 f64) (result f64)
+ (f64.promote/f32
+ (call $floats
+ (f32.demote/f64
+ (get_local $0)
+ )
+ )
+ )
+ )
+ (func $legalstub$neg (param $0 i32) (param $1 i32) (result f64)
+ (f64.promote/f32
+ (call $neg
+ (get_local $0)
+ (get_local $1)
+ )
+ )
+ )
+ (func $legalstub$bitcasts (param $0 i32) (param $1 f64)
+ (call $bitcasts
+ (get_local $0)
+ (f32.demote/f64
+ (get_local $1)
+ )
+ )
+ )
+)