summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/signext.wast12
-rw-r--r--test/signext.wast.from-wast33
-rw-r--r--test/signext.wast.fromBinary36
-rw-r--r--test/signext.wast.fromBinary.noDebugInfo36
4 files changed, 117 insertions, 0 deletions
diff --git a/test/signext.wast b/test/signext.wast
new file mode 100644
index 000000000..3370e9b16
--- /dev/null
+++ b/test/signext.wast
@@ -0,0 +1,12 @@
+(module
+ (type $0 (func))
+ (func $signext (type $0)
+ (local $0 i32)
+ (local $1 i64)
+ (drop (i32.extend8_s (get_local $0)))
+ (drop (i32.extend16_s (get_local $0)))
+ (drop (i64.extend8_s (get_local $1)))
+ (drop (i64.extend16_s (get_local $1)))
+ (drop (i64.extend32_s (get_local $1)))
+ )
+)
diff --git a/test/signext.wast.from-wast b/test/signext.wast.from-wast
new file mode 100644
index 000000000..6828723b5
--- /dev/null
+++ b/test/signext.wast.from-wast
@@ -0,0 +1,33 @@
+(module
+ (type $0 (func))
+ (memory $0 0)
+ (func $signext (type $0)
+ (local $0 i32)
+ (local $1 i64)
+ (drop
+ (i32.extend8_s
+ (get_local $0)
+ )
+ )
+ (drop
+ (i32.extend16_s
+ (get_local $0)
+ )
+ )
+ (drop
+ (i64.extend8_s
+ (get_local $1)
+ )
+ )
+ (drop
+ (i64.extend16_s
+ (get_local $1)
+ )
+ )
+ (drop
+ (i64.extend32_s
+ (get_local $1)
+ )
+ )
+ )
+)
diff --git a/test/signext.wast.fromBinary b/test/signext.wast.fromBinary
new file mode 100644
index 000000000..ec9b50aa2
--- /dev/null
+++ b/test/signext.wast.fromBinary
@@ -0,0 +1,36 @@
+(module
+ (type $0 (func))
+ (memory $0 0)
+ (func $signext (type $0)
+ (local $var$0 i32)
+ (local $var$1 i64)
+ (block $label$0
+ (drop
+ (i32.extend8_s
+ (get_local $var$0)
+ )
+ )
+ (drop
+ (i32.extend16_s
+ (get_local $var$0)
+ )
+ )
+ (drop
+ (i64.extend8_s
+ (get_local $var$1)
+ )
+ )
+ (drop
+ (i64.extend16_s
+ (get_local $var$1)
+ )
+ )
+ (drop
+ (i64.extend32_s
+ (get_local $var$1)
+ )
+ )
+ )
+ )
+)
+
diff --git a/test/signext.wast.fromBinary.noDebugInfo b/test/signext.wast.fromBinary.noDebugInfo
new file mode 100644
index 000000000..04ada421c
--- /dev/null
+++ b/test/signext.wast.fromBinary.noDebugInfo
@@ -0,0 +1,36 @@
+(module
+ (type $0 (func))
+ (memory $0 0)
+ (func $0 (type $0)
+ (local $var$0 i32)
+ (local $var$1 i64)
+ (block $label$0
+ (drop
+ (i32.extend8_s
+ (get_local $var$0)
+ )
+ )
+ (drop
+ (i32.extend16_s
+ (get_local $var$0)
+ )
+ )
+ (drop
+ (i64.extend8_s
+ (get_local $var$1)
+ )
+ )
+ (drop
+ (i64.extend16_s
+ (get_local $var$1)
+ )
+ )
+ (drop
+ (i64.extend32_s
+ (get_local $var$1)
+ )
+ )
+ )
+ )
+)
+