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

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

Issue 1778493004: [wasm] Int64Lowering of Int64Add on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed the use of the temp register on 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
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
11 #include "test/cctest/cctest.h" 11 #include "test/cctest/cctest.h"
12 #include "test/cctest/compiler/value-helper.h" 12 #include "test/cctest/compiler/value-helper.h"
13 #include "test/cctest/wasm/wasm-run-utils.h" 13 #include "test/cctest/wasm/wasm-run-utils.h"
14 14
15 // using namespace v8::base; 15 // using namespace v8::base;
16 // using namespace v8::internal; 16 // using namespace v8::internal;
17 // using namespace v8::internal::compiler; 17 // using namespace v8::internal::compiler;
18 // using namespace v8::internal::wasm; 18 // using namespace v8::internal::wasm;
19 19
20 // todo(ahaas): I added a list of missing instructions here to make merging 20 // todo(ahaas): I added a list of missing instructions here to make merging
21 // easier when I do them one by one. 21 // easier when I do them one by one.
22 // kExprI64Add: 22 // kExprI64Add:
23 TEST(Run_WasmI64Add) {
24 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
25 BUILD(r, WASM_I64_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
26 FOR_INT64_INPUTS(i) {
27 FOR_INT64_INPUTS(j) { CHECK_EQ(*i + *j, r.Call(*i, *j)); }
28 }
29 }
23 // kExprI64Sub: 30 // kExprI64Sub:
24 // kExprI64Mul: 31 // kExprI64Mul:
25 // kExprI64DivS: 32 // kExprI64DivS:
26 // kExprI64DivU: 33 // kExprI64DivU:
27 // kExprI64RemS: 34 // kExprI64RemS:
28 // kExprI64RemU: 35 // kExprI64RemU:
29 // kExprI64And: 36 // kExprI64And:
30 TEST(Run_WasmI64And) { 37 TEST(Run_WasmI64And) {
31 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64()); 38 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
32 BUILD(r, WASM_I64_AND(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); 39 BUILD(r, WASM_I64_AND(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 WASM_I64V_10(0xbcd1234000000013), WASM_I64V_10(0xbcd1234000000014), 302 WASM_I64V_10(0xbcd1234000000013), WASM_I64V_10(0xbcd1234000000014),
296 WASM_I64V_10(0xbcd1234000000015), WASM_I64V_10(0xbcd1234000000016), 303 WASM_I64V_10(0xbcd1234000000015), WASM_I64V_10(0xbcd1234000000016),
297 WASM_I64V_10(0xbcd1234000000017), WASM_I64V_10(0xbcd1234000000018), 304 WASM_I64V_10(0xbcd1234000000017), WASM_I64V_10(0xbcd1234000000018),
298 WASM_I64V_10(0xbcd1234000000019), WASM_I64V_10(0xbcd123400000001a), 305 WASM_I64V_10(0xbcd1234000000019), WASM_I64V_10(0xbcd123400000001a),
299 WASM_I64V_10(0xbcd123400000001b), WASM_I64V_10(0xbcd123400000001c), 306 WASM_I64V_10(0xbcd123400000001b), WASM_I64V_10(0xbcd123400000001c),
300 WASM_I64V_10(0xbcd123400000001d)))); 307 WASM_I64V_10(0xbcd123400000001d))));
301 308
302 CHECK_EQ(i + 0xb, r.Call()); 309 CHECK_EQ(i + 0xb, r.Call());
303 } 310 }
304 } 311 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698