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

Side by Side Diff: test/mjsunit/regress/wasm/regression-5800.js

Issue 2637583002: [wasm] Fix codegen issue for i64.add and i64.sub on ia32 (Closed)
Patch Set: Add test-run-wasm-64.cc tests Created 3 years, 11 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
(Empty)
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 load("test/mjsunit/wasm/wasm-constants.js");
6 load("test/mjsunit/wasm/wasm-module-builder.js");
7
8 (function AddTest() {
9 let builder = new WasmModuleBuilder();
10
11 builder.addFunction("main", kSig_i_v)
12 .addBody([
13 kExprBlock, kWasmStmt,
14 kExprI64Const, 0,
15 kExprI64Const, 0x80, 0x80, 0x80, 0x80, 0x10,
Mircea Trofin 2017/01/18 21:01:56 mind adding a comment explaining what's with these
Eric Holk 2017/01/18 21:20:50 Done.
16 kExprI64Add,
17 kExprI64Eqz,
18 kExprBrIf, 0,
19 kExprI32Const, 0,
20 kExprReturn,
21 kExprEnd,
22 kExprI32Const, 0
23 ])
24 .exportFunc();
25 let module = builder.instantiate();
26 assertEquals(0, module.exports.main());
27 })();
28
29 (function SubTest() {
30 let builder = new WasmModuleBuilder();
31
32 builder.addFunction("main", kSig_i_v)
33 .addBody([
34 kExprBlock, kWasmStmt,
35 kExprI64Const, 0,
36 kExprI64Const, 0x80, 0x80, 0x80, 0x80, 0x10,
37 kExprI64Sub,
38 kExprI64Eqz,
39 kExprBrIf, 0,
40 kExprI32Const, 0,
41 kExprReturn,
42 kExprEnd,
43 kExprI32Const, 0
44 ])
45 .exportFunc();
46 let module = builder.instantiate();
47 assertEquals(0, module.exports.main());
48 })();
OLDNEW
« test/cctest/wasm/test-run-wasm-64.cc ('K') | « test/cctest/wasm/test-run-wasm-64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698