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

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

Issue 2440953002: [wasm] Binary 0xD: update encoding of opcodes, types, and add immediates. (Closed)
Patch Set: Update after moving copysign Created 4 years, 2 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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/wasm/wasm-macro-gen.h" 10 #include "src/wasm/wasm-macro-gen.h"
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 module.AddSignature(sig); 1563 module.AddSignature(sig);
1564 module.AddIndirectFunctionTable(nullptr, 0); 1564 module.AddIndirectFunctionTable(nullptr, 0);
1565 1565
1566 WasmFunctionCompiler t(sig, &module); 1566 WasmFunctionCompiler t(sig, &module);
1567 1567
1568 std::vector<byte> code; 1568 std::vector<byte> code;
1569 for (byte p = 0; p < num_params; p++) { 1569 for (byte p = 0; p < num_params; p++) {
1570 ADD_CODE(code, kExprGetLocal, p); 1570 ADD_CODE(code, kExprGetLocal, p);
1571 } 1571 }
1572 ADD_CODE(code, kExprI8Const, 0); 1572 ADD_CODE(code, kExprI8Const, 0);
1573 ADD_CODE(code, kExprCallIndirect, 1); 1573 ADD_CODE(code, kExprCallIndirect, 0, 1);
1574 1574
1575 t.Build(&code[0], &code[0] + code.size()); 1575 t.Build(&code[0], &code[0] + code.size());
1576 t.Compile(); 1576 t.Compile();
1577 } 1577 }
1578 } 1578 }
1579 1579
1580 TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); } 1580 TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); }
1581 1581
1582 static void Run_WasmMixedCall_N(WasmExecutionMode execution_mode, int start) { 1582 static void Run_WasmMixedCall_N(WasmExecutionMode execution_mode, int start) {
1583 const int kExpected = 6333; 1583 const int kExpected = 6333;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 CHECK_EQ(expected, result); 1654 CHECK_EQ(expected, result);
1655 } 1655 }
1656 } 1656 }
1657 } 1657 }
1658 } 1658 }
1659 1659
1660 WASM_EXEC_TEST(MixedCall_i64_0) { Run_WasmMixedCall_N(execution_mode, 0); } 1660 WASM_EXEC_TEST(MixedCall_i64_0) { Run_WasmMixedCall_N(execution_mode, 0); }
1661 WASM_EXEC_TEST(MixedCall_i64_1) { Run_WasmMixedCall_N(execution_mode, 1); } 1661 WASM_EXEC_TEST(MixedCall_i64_1) { Run_WasmMixedCall_N(execution_mode, 1); }
1662 WASM_EXEC_TEST(MixedCall_i64_2) { Run_WasmMixedCall_N(execution_mode, 2); } 1662 WASM_EXEC_TEST(MixedCall_i64_2) { Run_WasmMixedCall_N(execution_mode, 2); }
1663 WASM_EXEC_TEST(MixedCall_i64_3) { Run_WasmMixedCall_N(execution_mode, 3); } 1663 WASM_EXEC_TEST(MixedCall_i64_3) { Run_WasmMixedCall_N(execution_mode, 3); }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698