Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: test/unittests/wasm/wasm-macro-gen-unittest.cc

Issue 2230063002: [wasm] Experimental: Add support for multiple non-homogeneous tables Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/unittests/wasm/ast-decoder-unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "test/unittests/test-utils.h" 5 #include "test/unittests/test-utils.h"
6 6
7 #include "src/wasm/wasm-macro-gen.h" 7 #include "src/wasm/wasm-macro-gen.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 TEST_F(WasmMacroGenTest, CallImport) { 134 TEST_F(WasmMacroGenTest, CallImport) {
135 EXPECT_SIZE(3, WASM_CALL_IMPORT0(0)); 135 EXPECT_SIZE(3, WASM_CALL_IMPORT0(0));
136 EXPECT_SIZE(3, WASM_CALL_IMPORT0(1)); 136 EXPECT_SIZE(3, WASM_CALL_IMPORT0(1));
137 EXPECT_SIZE(3, WASM_CALL_IMPORT0(11)); 137 EXPECT_SIZE(3, WASM_CALL_IMPORT0(11));
138 138
139 EXPECT_SIZE(5, WASM_CALL_IMPORT1(0, WASM_ZERO)); 139 EXPECT_SIZE(5, WASM_CALL_IMPORT1(0, WASM_ZERO));
140 EXPECT_SIZE(7, WASM_CALL_IMPORT2(1, WASM_ZERO, WASM_ZERO)); 140 EXPECT_SIZE(7, WASM_CALL_IMPORT2(1, WASM_ZERO, WASM_ZERO));
141 } 141 }
142 142
143 TEST_F(WasmMacroGenTest, CallIndirect) { 143 TEST_F(WasmMacroGenTest, CallIndirect) {
144 EXPECT_SIZE(5, WASM_CALL_INDIRECT0(0, WASM_ZERO)); 144 EXPECT_SIZE(5, WASM_CALL_INDIRECT0(0, 0, WASM_ZERO));
145 EXPECT_SIZE(5, WASM_CALL_INDIRECT0(1, WASM_ZERO)); 145 EXPECT_SIZE(5, WASM_CALL_INDIRECT0(1, 0, WASM_ZERO));
146 EXPECT_SIZE(5, WASM_CALL_INDIRECT0(11, WASM_ZERO)); 146 EXPECT_SIZE(5, WASM_CALL_INDIRECT0(11, 0, WASM_ZERO));
147 147
148 EXPECT_SIZE(7, WASM_CALL_INDIRECT1(0, WASM_ZERO, WASM_ZERO)); 148 EXPECT_SIZE(7, WASM_CALL_INDIRECT1(0, 0, WASM_ZERO, WASM_ZERO));
149 EXPECT_SIZE(9, WASM_CALL_INDIRECT2(1, WASM_ZERO, WASM_ZERO, WASM_ZERO)); 149 EXPECT_SIZE(9, WASM_CALL_INDIRECT2(1, 0, WASM_ZERO, WASM_ZERO, WASM_ZERO));
150 } 150 }
151 151
152 TEST_F(WasmMacroGenTest, Int32Ops) { 152 TEST_F(WasmMacroGenTest, Int32Ops) {
153 EXPECT_SIZE(5, WASM_I32_ADD(WASM_ZERO, WASM_ZERO)); 153 EXPECT_SIZE(5, WASM_I32_ADD(WASM_ZERO, WASM_ZERO));
154 EXPECT_SIZE(5, WASM_I32_SUB(WASM_ZERO, WASM_ZERO)); 154 EXPECT_SIZE(5, WASM_I32_SUB(WASM_ZERO, WASM_ZERO));
155 EXPECT_SIZE(5, WASM_I32_MUL(WASM_ZERO, WASM_ZERO)); 155 EXPECT_SIZE(5, WASM_I32_MUL(WASM_ZERO, WASM_ZERO));
156 EXPECT_SIZE(5, WASM_I32_DIVS(WASM_ZERO, WASM_ZERO)); 156 EXPECT_SIZE(5, WASM_I32_DIVS(WASM_ZERO, WASM_ZERO));
157 EXPECT_SIZE(5, WASM_I32_DIVU(WASM_ZERO, WASM_ZERO)); 157 EXPECT_SIZE(5, WASM_I32_DIVU(WASM_ZERO, WASM_ZERO));
158 EXPECT_SIZE(5, WASM_I32_REMS(WASM_ZERO, WASM_ZERO)); 158 EXPECT_SIZE(5, WASM_I32_REMS(WASM_ZERO, WASM_ZERO));
159 EXPECT_SIZE(5, WASM_I32_REMU(WASM_ZERO, WASM_ZERO)); 159 EXPECT_SIZE(5, WASM_I32_REMU(WASM_ZERO, WASM_ZERO));
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 EXPECT_SIZE(5, WASM_LOAD_MEM_OFFSET(kMemTypes[i], 11, WASM_ZERO)); 313 EXPECT_SIZE(5, WASM_LOAD_MEM_OFFSET(kMemTypes[i], 11, WASM_ZERO));
314 } 314 }
315 for (size_t i = 0; i < arraysize(kMemTypes); i++) { 315 for (size_t i = 0; i < arraysize(kMemTypes); i++) {
316 EXPECT_SIZE(7, WASM_STORE_MEM_OFFSET(kMemTypes[i], 13, WASM_ZERO, 316 EXPECT_SIZE(7, WASM_STORE_MEM_OFFSET(kMemTypes[i], 13, WASM_ZERO,
317 WASM_GET_LOCAL(0))); 317 WASM_GET_LOCAL(0)));
318 } 318 }
319 } 319 }
320 } // namespace wasm 320 } // namespace wasm
321 } // namespace internal 321 } // namespace internal
322 } // namespace v8 322 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/wasm/ast-decoder-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698