From d4c09c3840d9dece483fd78d6def9d39907152b2 Mon Sep 17 00:00:00 2001 From: Wanming Lin Date: Wed, 11 Mar 2020 11:24:04 +0800 Subject: [PATCH] Fixed multiple tables error in simd_const.wast Fixed @binji's comment at https://github.com/WebAssembly/simd/pull/132#commitcomment-37757400 --- test/core/simd/simd_const.wast | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/core/simd/simd_const.wast b/test/core/simd/simd_const.wast index ebc734c6a..41fb608d8 100644 --- a/test/core/simd/simd_const.wast +++ b/test/core/simd/simd_const.wast @@ -909,13 +909,6 @@ (func (export "as-call-param") (result v128) (call $f (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3)) ) - (type $sig (func (param v128 v128 v128) (result v128))) - (table funcref (elem $f)) - (func (export "as-call_indirect-param") (result v128) - (call_indirect (type $sig) - (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (i32.const 0) - ) - ) (func (export "as-block-retval") (result v128) (block (result v128) (v128.const i32x4 0 1 2 3)) ) @@ -951,11 +944,17 @@ (func (export "as-call-param2") (result v128) (call $f2 (v128.const i64x2 0 1) (v128.const i64x2 0 1) (v128.const i64x2 0 1)) ) - (type $sig2 (func (param v128 v128 v128) (result v128))) - (table funcref (elem $f2)) + + (type $sig (func (param v128 v128 v128) (result v128))) + (table funcref (elem $f $f2)) + (func (export "as-call_indirect-param") (result v128) + (call_indirect (type $sig) + (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (i32.const 0) + ) + ) (func (export "as-call_indirect-param2") (result v128) - (call_indirect (type $sig2) - (v128.const i64x2 0 1) (v128.const i64x2 0 1) (v128.const i64x2 0 1) (i32.const 0) + (call_indirect (type $sig) + (v128.const i64x2 0 1) (v128.const i64x2 0 1) (v128.const i64x2 0 1) (i32.const 1) ) ) (func (export "as-block-retval2") (result v128) @@ -986,6 +985,7 @@ (assert_return (invoke "as-if-then-retval2") (v128.const i64x2 0 1)) (assert_return (invoke "as-if-else-retval2") (v128.const i64x2 1 0)) (assert_return (invoke "as-call-param2") (v128.const i64x2 0 1)) +(assert_return (invoke "as-call_indirect-param2") (v128.const i64x2 0 1)) (assert_return (invoke "as-block-retval2") (v128.const i64x2 0 1)) (assert_return (invoke "as-loop-retval2") (v128.const i64x2 0 1)) (assert_return (invoke "as-drop-operand2"))