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

Side by Side Diff: test/cctest/wasm/test-run-wasm-64.cc

Issue 1798863004: [wasm] Add I64Eqz operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « src/wasm/wasm-opcodes.h ('k') | test/unittests/wasm/wasm-macro-gen-unittest.cc » ('j') | 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 <stdint.h> 5 #include <stdint.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "src/wasm/wasm-macro-gen.h" 9 #include "src/wasm/wasm-macro-gen.h"
10 10
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 WASM_I64_SCONVERT_I32(WASM_GET_LOCAL(0)))), 1194 WASM_I64_SCONVERT_I32(WASM_GET_LOCAL(0)))),
1195 WASM_ZERO)); 1195 WASM_ZERO));
1196 1196
1197 *global = 0xFFFFFFFFFFFFFFFFLL; 1197 *global = 0xFFFFFFFFFFFFFFFFLL;
1198 for (int i = 9; i < 444444; i += 111111) { 1198 for (int i = 9; i < 444444; i += 111111) {
1199 int64_t expected = *global & i; 1199 int64_t expected = *global & i;
1200 r.Call(i); 1200 r.Call(i);
1201 CHECK_EQ(expected, *global); 1201 CHECK_EQ(expected, *global);
1202 } 1202 }
1203 } 1203 }
1204
1205 TEST(Run_WasmI64Eqz) {
1206 REQUIRE(I64Eq);
1207
1208 WasmRunner<int32_t> r(MachineType::Int64());
1209 BUILD(r, WASM_I64_EQZ(WASM_GET_LOCAL(0)));
1210
1211 FOR_INT64_INPUTS(i) {
1212 int32_t result = *i == 0 ? 1 : 0;
1213 CHECK_EQ(result, r.Call(*i));
1214 }
1215 }
OLDNEW
« no previous file with comments | « src/wasm/wasm-opcodes.h ('k') | test/unittests/wasm/wasm-macro-gen-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698