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

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

Issue 1756863002: [wasm] Int64Lowering of I64Shl on ia32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Forgot to turn off the test for arm. 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 | « test/cctest/test-disasm-ia32.cc ('k') | test/unittests/compiler/int64-lowering-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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 // kExprI64Xor: 45 // kExprI64Xor:
46 TEST(Run_WasmI64Xor) { 46 TEST(Run_WasmI64Xor) {
47 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64()); 47 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
48 BUILD(r, WASM_I64_XOR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); 48 BUILD(r, WASM_I64_XOR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
49 FOR_INT64_INPUTS(i) { 49 FOR_INT64_INPUTS(i) {
50 FOR_INT64_INPUTS(j) { CHECK_EQ((*i) ^ (*j), r.Call(*i, *j)); } 50 FOR_INT64_INPUTS(j) { CHECK_EQ((*i) ^ (*j), r.Call(*i, *j)); }
51 } 51 }
52 } 52 }
53 // kExprI64Shl: 53 // kExprI64Shl:
54 #if !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_X87 && !V8_TARGET_ARCH_ARM
55 TEST(Run_WasmI64Shl) {
56 {
57 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
58 BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
59 FOR_UINT64_INPUTS(i) {
60 for (int64_t j = 1; j < 64; j++) {
61 CHECK_EQ(*i << j, r.Call(*i, j));
62 }
63 }
64 }
65 {
66 WasmRunner<int64_t> r(MachineType::Int64());
67 BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_I64V_1(0)));
68 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 0, r.Call(*i)); }
69 }
70 {
71 WasmRunner<int64_t> r(MachineType::Int64());
72 BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_I64V_1(32)));
73 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 32, r.Call(*i)); }
74 }
75 {
76 WasmRunner<int64_t> r(MachineType::Int64());
77 BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_I64V_1(20)));
78 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 20, r.Call(*i)); }
79 }
80 {
81 WasmRunner<int64_t> r(MachineType::Int64());
82 BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_I64V_1(40)));
83 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 40, r.Call(*i)); }
84 }
85 }
86 #endif
54 // kExprI64ShrU: 87 // kExprI64ShrU:
55 // kExprI64ShrS: 88 // kExprI64ShrS:
56 // kExprI64Eq: 89 // kExprI64Eq:
57 TEST(Run_WasmI64Eq) { 90 TEST(Run_WasmI64Eq) {
58 WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64()); 91 WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
59 BUILD(r, WASM_I64_EQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); 92 BUILD(r, WASM_I64_EQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
60 FOR_INT64_INPUTS(i) { 93 FOR_INT64_INPUTS(i) {
61 FOR_INT64_INPUTS(j) { CHECK_EQ(*i == *j ? 1 : 0, r.Call(*i, *j)); } 94 FOR_INT64_INPUTS(j) { CHECK_EQ(*i == *j ? 1 : 0, r.Call(*i, *j)); }
62 } 95 }
63 } 96 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 WASM_I64V_10(0xbcd1234000000013), WASM_I64V_10(0xbcd1234000000014), 219 WASM_I64V_10(0xbcd1234000000013), WASM_I64V_10(0xbcd1234000000014),
187 WASM_I64V_10(0xbcd1234000000015), WASM_I64V_10(0xbcd1234000000016), 220 WASM_I64V_10(0xbcd1234000000015), WASM_I64V_10(0xbcd1234000000016),
188 WASM_I64V_10(0xbcd1234000000017), WASM_I64V_10(0xbcd1234000000018), 221 WASM_I64V_10(0xbcd1234000000017), WASM_I64V_10(0xbcd1234000000018),
189 WASM_I64V_10(0xbcd1234000000019), WASM_I64V_10(0xbcd123400000001a), 222 WASM_I64V_10(0xbcd1234000000019), WASM_I64V_10(0xbcd123400000001a),
190 WASM_I64V_10(0xbcd123400000001b), WASM_I64V_10(0xbcd123400000001c), 223 WASM_I64V_10(0xbcd123400000001b), WASM_I64V_10(0xbcd123400000001c),
191 WASM_I64V_10(0xbcd123400000001d)))); 224 WASM_I64V_10(0xbcd123400000001d))));
192 225
193 CHECK_EQ(i + 0xb, r.Call()); 226 CHECK_EQ(i + 0xb, r.Call());
194 } 227 }
195 } 228 }
OLDNEW
« no previous file with comments | « test/cctest/test-disasm-ia32.cc ('k') | test/unittests/compiler/int64-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698