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

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

Issue 1778893004: [wasm] Implementation of Word32PairShr and Word32PairSar on arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@pair-shl-test
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
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 20, r.Call(*i)); } 85 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 20, r.Call(*i)); }
86 } 86 }
87 { 87 {
88 WasmRunner<int64_t> r(MachineType::Int64()); 88 WasmRunner<int64_t> r(MachineType::Int64());
89 BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_I64V_1(40))); 89 BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_I64V_1(40)));
90 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 40, r.Call(*i)); } 90 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 40, r.Call(*i)); }
91 } 91 }
92 } 92 }
93 #endif 93 #endif
94 // kExprI64ShrU: 94 // kExprI64ShrU:
95 #if !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_X87 && !V8_TARGET_ARCH_ARM 95 #if !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_X87
96 TEST(Run_WasmI64ShrU) { 96 TEST(Run_WasmI64ShrU) {
97 { 97 {
98 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64()); 98 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
99 BUILD(r, WASM_I64_SHR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); 99 BUILD(r, WASM_I64_SHR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
100 FOR_UINT64_INPUTS(i) { 100 FOR_UINT64_INPUTS(i) {
101 for (int64_t j = 1; j < 64; j++) { 101 for (int64_t j = 1; j < 64; j++) {
102 CHECK_EQ(*i >> j, r.Call(*i, j)); 102 CHECK_EQ(*i >> j, r.Call(*i, j));
103 } 103 }
104 } 104 }
105 } 105 }
(...skipping 13 matching lines...) Expand all
119 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i >> 20, r.Call(*i)); } 119 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i >> 20, r.Call(*i)); }
120 } 120 }
121 { 121 {
122 WasmRunner<int64_t> r(MachineType::Int64()); 122 WasmRunner<int64_t> r(MachineType::Int64());
123 BUILD(r, WASM_I64_SHR(WASM_GET_LOCAL(0), WASM_I64V_1(40))); 123 BUILD(r, WASM_I64_SHR(WASM_GET_LOCAL(0), WASM_I64V_1(40)));
124 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i >> 40, r.Call(*i)); } 124 FOR_UINT64_INPUTS(i) { CHECK_EQ(*i >> 40, r.Call(*i)); }
125 } 125 }
126 } 126 }
127 #endif 127 #endif
128 // kExprI64ShrS: 128 // kExprI64ShrS:
129 #if !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_X87 && !V8_TARGET_ARCH_ARM 129 #if !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_X87
130 TEST(Run_WasmI64ShrS) { 130 TEST(Run_WasmI64ShrS) {
131 { 131 {
132 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64()); 132 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
133 BUILD(r, WASM_I64_SAR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); 133 BUILD(r, WASM_I64_SAR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
134 FOR_INT64_INPUTS(i) { 134 FOR_INT64_INPUTS(i) {
135 for (int64_t j = 1; j < 64; j++) { 135 for (int64_t j = 1; j < 64; j++) {
136 CHECK_EQ(*i >> j, r.Call(*i, j)); 136 CHECK_EQ(*i >> j, r.Call(*i, j));
137 } 137 }
138 } 138 }
139 } 139 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 WASM_I64V_10(0xbcd1234000000013), WASM_I64V_10(0xbcd1234000000014), 302 WASM_I64V_10(0xbcd1234000000013), WASM_I64V_10(0xbcd1234000000014),
303 WASM_I64V_10(0xbcd1234000000015), WASM_I64V_10(0xbcd1234000000016), 303 WASM_I64V_10(0xbcd1234000000015), WASM_I64V_10(0xbcd1234000000016),
304 WASM_I64V_10(0xbcd1234000000017), WASM_I64V_10(0xbcd1234000000018), 304 WASM_I64V_10(0xbcd1234000000017), WASM_I64V_10(0xbcd1234000000018),
305 WASM_I64V_10(0xbcd1234000000019), WASM_I64V_10(0xbcd123400000001a), 305 WASM_I64V_10(0xbcd1234000000019), WASM_I64V_10(0xbcd123400000001a),
306 WASM_I64V_10(0xbcd123400000001b), WASM_I64V_10(0xbcd123400000001c), 306 WASM_I64V_10(0xbcd123400000001b), WASM_I64V_10(0xbcd123400000001c),
307 WASM_I64V_10(0xbcd123400000001d)))); 307 WASM_I64V_10(0xbcd123400000001d))));
308 308
309 CHECK_EQ(i + 0xb, r.Call()); 309 CHECK_EQ(i + 0xb, r.Call());
310 } 310 }
311 } 311 }
OLDNEW
« src/compiler/arm/instruction-selector-arm.cc ('K') | « src/compiler/arm/instruction-selector-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698