summaryrefslogtreecommitdiff
path: root/test/lit/table-operations.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/table-operations.wast')
-rw-r--r--test/lit/table-operations.wast36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/lit/table-operations.wast b/test/lit/table-operations.wast
index e3daa463b..f3aafe51a 100644
--- a/test/lit/table-operations.wast
+++ b/test/lit/table-operations.wast
@@ -18,6 +18,8 @@
;; CHECK-BINARY: (type $3 (func (param i32 funcref i32)))
+ ;; CHECK-BINARY: (type $4 (func (param i32 i32 i32)))
+
;; CHECK-BINARY: (table $table-1 1 1 funcref)
;; CHECK-TEXT: (type $0 (func))
@@ -27,6 +29,8 @@
;; CHECK-TEXT: (type $3 (func (param i32 funcref i32)))
+ ;; CHECK-TEXT: (type $4 (func (param i32 i32 i32)))
+
;; CHECK-TEXT: (table $table-1 1 1 funcref)
(table $table-1 funcref
(elem $foo)
@@ -173,6 +177,28 @@
(local.get $size)
)
)
+
+ ;; CHECK-BINARY: (func $table-copy (type $4) (param $dest i32) (param $source i32) (param $size i32)
+ ;; CHECK-BINARY-NEXT: (table.copy $table-1 $table-2
+ ;; CHECK-BINARY-NEXT: (local.get $dest)
+ ;; CHECK-BINARY-NEXT: (local.get $source)
+ ;; CHECK-BINARY-NEXT: (local.get $size)
+ ;; CHECK-BINARY-NEXT: )
+ ;; CHECK-BINARY-NEXT: )
+ ;; CHECK-TEXT: (func $table-copy (type $4) (param $dest i32) (param $source i32) (param $size i32)
+ ;; CHECK-TEXT-NEXT: (table.copy $table-1 $table-2
+ ;; CHECK-TEXT-NEXT: (local.get $dest)
+ ;; CHECK-TEXT-NEXT: (local.get $source)
+ ;; CHECK-TEXT-NEXT: (local.get $size)
+ ;; CHECK-TEXT-NEXT: )
+ ;; CHECK-TEXT-NEXT: )
+ (func $table-copy (param $dest i32) (param $source i32) (param $size i32)
+ (table.copy $table-1 $table-2
+ (local.get $dest)
+ (local.get $source)
+ (local.get $size)
+ )
+ )
)
;; CHECK-NODEBUG: (type $0 (func))
@@ -182,6 +208,8 @@
;; CHECK-NODEBUG: (type $3 (func (param i32 funcref i32)))
+;; CHECK-NODEBUG: (type $4 (func (param i32 i32 i32)))
+
;; CHECK-NODEBUG: (table $0 1 1 funcref)
;; CHECK-NODEBUG: (table $1 3 3 funcref)
@@ -237,3 +265,11 @@
;; CHECK-NODEBUG-NEXT: (local.get $2)
;; CHECK-NODEBUG-NEXT: )
;; CHECK-NODEBUG-NEXT: )
+
+;; CHECK-NODEBUG: (func $6 (type $4) (param $0 i32) (param $1 i32) (param $2 i32)
+;; CHECK-NODEBUG-NEXT: (table.copy $0 $1
+;; CHECK-NODEBUG-NEXT: (local.get $0)
+;; CHECK-NODEBUG-NEXT: (local.get $1)
+;; CHECK-NODEBUG-NEXT: (local.get $2)
+;; CHECK-NODEBUG-NEXT: )
+;; CHECK-NODEBUG-NEXT: )