Index: test/unittests/wasm/wasm-macro-gen-unittest.cc |
diff --git a/test/unittests/wasm/wasm-macro-gen-unittest.cc b/test/unittests/wasm/wasm-macro-gen-unittest.cc |
index ec188c00c9af7624e65b30c3430ceef9c8135e11..43bc4fc4ecd3fa8f58a2f1537f36a31c1ffac803 100644 |
--- a/test/unittests/wasm/wasm-macro-gen-unittest.cc |
+++ b/test/unittests/wasm/wasm-macro-gen-unittest.cc |
@@ -58,46 +58,46 @@ TEST_F(WasmMacroGenTest, Statements) { |
EXPECT_SIZE(7, WASM_STORE_MEM(MachineType::Int32(), WASM_ZERO, WASM_ZERO)); |
- EXPECT_SIZE(4, WASM_IF(WASM_ZERO, WASM_NOP)); |
+ EXPECT_SIZE(5, WASM_IF(WASM_ZERO, WASM_NOP)); |
- EXPECT_SIZE(5, WASM_IF_ELSE(WASM_ZERO, WASM_NOP, WASM_NOP)); |
+ EXPECT_SIZE(7, WASM_IF_ELSE(WASM_ZERO, WASM_NOP, WASM_NOP)); |
EXPECT_SIZE(5, WASM_SELECT(WASM_ZERO, WASM_NOP, WASM_NOP)); |
- EXPECT_SIZE(3, WASM_BR(0)); |
+ EXPECT_SIZE(4, WASM_BR(0)); |
EXPECT_SIZE(5, WASM_BR_IF(0, WASM_ZERO)); |
EXPECT_SIZE(3, WASM_BLOCK(1, WASM_NOP)); |
EXPECT_SIZE(4, WASM_BLOCK(2, WASM_NOP, WASM_NOP)); |
EXPECT_SIZE(5, WASM_BLOCK(3, WASM_NOP, WASM_NOP, WASM_NOP)); |
- EXPECT_SIZE(5, WASM_INFINITE_LOOP); |
+ EXPECT_SIZE(6, WASM_INFINITE_LOOP); |
EXPECT_SIZE(3, WASM_LOOP(1, WASM_NOP)); |
EXPECT_SIZE(4, WASM_LOOP(2, WASM_NOP, WASM_NOP)); |
EXPECT_SIZE(5, WASM_LOOP(3, WASM_NOP, WASM_NOP, WASM_NOP)); |
- EXPECT_SIZE(5, WASM_LOOP(1, WASM_BR(0))); |
+ EXPECT_SIZE(6, WASM_LOOP(1, WASM_BR(0))); |
EXPECT_SIZE(7, WASM_LOOP(1, WASM_BR_IF(0, WASM_ZERO))); |
- EXPECT_SIZE(1, WASM_RETURN0); |
- EXPECT_SIZE(3, WASM_RETURN(WASM_ZERO)); |
- EXPECT_SIZE(5, WASM_RETURN(WASM_ZERO, WASM_ZERO)); |
+ EXPECT_SIZE(2, WASM_RETURN0); |
+ EXPECT_SIZE(4, WASM_RETURN1(WASM_ZERO)); |
EXPECT_SIZE(1, WASM_UNREACHABLE); |
} |
TEST_F(WasmMacroGenTest, MacroStatements) { |
- EXPECT_SIZE(8, WASM_WHILE(WASM_I8(0), WASM_NOP)); |
+ EXPECT_SIZE(10, WASM_WHILE(WASM_I8(0), WASM_NOP)); |
EXPECT_SIZE(7, WASM_INC_LOCAL(0)); |
EXPECT_SIZE(7, WASM_INC_LOCAL_BY(0, 3)); |
- EXPECT_SIZE(3, WASM_BREAK(0)); |
- EXPECT_SIZE(3, WASM_CONTINUE(0)); |
+ EXPECT_SIZE(4, WASM_BREAK(0)); |
+ EXPECT_SIZE(4, WASM_CONTINUE(0)); |
} |
TEST_F(WasmMacroGenTest, BrTable) { |
- EXPECT_SIZE(8, WASM_BR_TABLE(WASM_ZERO, 1, BR_TARGET(1))); |
+ EXPECT_SIZE(9, WASM_BR_TABLE(WASM_ZERO, 1, BR_TARGET(1))); |
+ EXPECT_SIZE(11, WASM_BR_TABLEV(WASM_ZERO, WASM_ZERO, 1, BR_TARGET(1))); |
} |
@@ -114,8 +114,8 @@ TEST_F(WasmMacroGenTest, Expressions) { |
EXPECT_SIZE(3, WASM_NOT(WASM_ZERO)); |
- EXPECT_SIZE(4, WASM_BRV(1, WASM_ZERO)); |
- EXPECT_SIZE(6, WASM_BRV_IF(1, WASM_ZERO, WASM_ZERO)); |
+ EXPECT_SIZE(5, WASM_BRV(1, WASM_ZERO)); |
+ EXPECT_SIZE(7, WASM_BRV_IF(1, WASM_ZERO, WASM_ZERO)); |
EXPECT_SIZE(4, WASM_BLOCK(1, WASM_ZERO)); |
EXPECT_SIZE(5, WASM_BLOCK(2, WASM_NOP, WASM_ZERO)); |
@@ -127,33 +127,32 @@ TEST_F(WasmMacroGenTest, Expressions) { |
} |
TEST_F(WasmMacroGenTest, CallFunction) { |
- EXPECT_SIZE(2, WASM_CALL_FUNCTION0(0)); |
- EXPECT_SIZE(2, WASM_CALL_FUNCTION0(1)); |
- EXPECT_SIZE(2, WASM_CALL_FUNCTION0(11)); |
+ EXPECT_SIZE(3, WASM_CALL_FUNCTION0(0)); |
+ EXPECT_SIZE(3, WASM_CALL_FUNCTION0(1)); |
+ EXPECT_SIZE(3, WASM_CALL_FUNCTION0(11)); |
- EXPECT_SIZE(4, WASM_CALL_FUNCTION(0, WASM_ZERO)); |
- EXPECT_SIZE(6, WASM_CALL_FUNCTION(1, WASM_ZERO, WASM_ZERO)); |
+ EXPECT_SIZE(5, WASM_CALL_FUNCTION1(0, WASM_ZERO)); |
+ EXPECT_SIZE(7, WASM_CALL_FUNCTION2(1, WASM_ZERO, WASM_ZERO)); |
} |
TEST_F(WasmMacroGenTest, CallImport) { |
- EXPECT_SIZE(2, WASM_CALL_IMPORT0(0)); |
- EXPECT_SIZE(2, WASM_CALL_IMPORT0(1)); |
- EXPECT_SIZE(2, WASM_CALL_IMPORT0(11)); |
+ EXPECT_SIZE(3, WASM_CALL_IMPORT0(0)); |
+ EXPECT_SIZE(3, WASM_CALL_IMPORT0(1)); |
+ EXPECT_SIZE(3, WASM_CALL_IMPORT0(11)); |
- EXPECT_SIZE(4, WASM_CALL_IMPORT(0, WASM_ZERO)); |
- EXPECT_SIZE(6, WASM_CALL_IMPORT(1, WASM_ZERO, WASM_ZERO)); |
+ EXPECT_SIZE(5, WASM_CALL_IMPORT1(0, WASM_ZERO)); |
+ EXPECT_SIZE(7, WASM_CALL_IMPORT2(1, WASM_ZERO, WASM_ZERO)); |
} |
TEST_F(WasmMacroGenTest, CallIndirect) { |
- EXPECT_SIZE(4, WASM_CALL_INDIRECT0(0, WASM_ZERO)); |
- EXPECT_SIZE(4, WASM_CALL_INDIRECT0(1, WASM_ZERO)); |
- EXPECT_SIZE(4, WASM_CALL_INDIRECT0(11, WASM_ZERO)); |
+ EXPECT_SIZE(5, WASM_CALL_INDIRECT0(0, WASM_ZERO)); |
+ EXPECT_SIZE(5, WASM_CALL_INDIRECT0(1, WASM_ZERO)); |
+ EXPECT_SIZE(5, WASM_CALL_INDIRECT0(11, WASM_ZERO)); |
- EXPECT_SIZE(6, WASM_CALL_INDIRECT(0, WASM_ZERO, WASM_ZERO)); |
- EXPECT_SIZE(8, WASM_CALL_INDIRECT(1, WASM_ZERO, WASM_ZERO, WASM_ZERO)); |
+ EXPECT_SIZE(7, WASM_CALL_INDIRECT1(0, WASM_ZERO, WASM_ZERO)); |
+ EXPECT_SIZE(9, WASM_CALL_INDIRECT2(1, WASM_ZERO, WASM_ZERO, WASM_ZERO)); |
} |
- |
TEST_F(WasmMacroGenTest, Int32Ops) { |
EXPECT_SIZE(5, WASM_I32_ADD(WASM_ZERO, WASM_ZERO)); |
EXPECT_SIZE(5, WASM_I32_SUB(WASM_ZERO, WASM_ZERO)); |