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

Unified Diff: test/cctest/wasm/wasm-run-utils.h

Issue 1704033002: [wasm] WasmRunner can run tests with I64 parameters and return value. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@new_wasm_runner
Patch Set: Removed const CallDescriptor changes again. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« test/cctest/wasm/test-run-wasm.cc ('K') | « test/cctest/wasm/test-run-wasm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/wasm-run-utils.h
diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h
index 732516feb6fff6aba7ff7fd4efa62dca6243c4aa..86ab9b1f981a0a88421d84de337afcfbf1e3d077 100644
--- a/test/cctest/wasm/wasm-run-utils.h
+++ b/test/cctest/wasm/wasm-run-utils.h
@@ -245,7 +245,7 @@ inline void TestBuildingGraph(Zone* zone, JSGraph* jsgraph, FunctionEnv* env,
str << ", msg = " << result.error_msg.get();
FATAL(str.str().c_str());
}
- builder.Int64LoweringForTesting();
+ builder.Int64LoweringForTesting(env->sig);
if (FLAG_trace_turbo_graph) {
OFStream os(stdout);
os << AsRPO(*jsgraph->graph());
@@ -351,6 +351,19 @@ class WasmFunctionWrapper : public HandleAndZoneScope,
CallDescriptor* descriptor =
Linkage::GetSimplifiedCDescriptor(zone(), signature_, true);
+#if !WASM_64
titzer 2016/02/18 12:06:22 I don't understand what this signature is for. See
ahaas 2016/02/18 13:00:18 I need the signature of the wrapper as Signature<M
+
+ Signature<MachineRepresentation>::Builder rep_builder(zone(), 1, 4);
ahaas 2016/02/18 13:00:18 I introduced a new #define for the maximum number
+
+ rep_builder.AddReturn(MachineRepresentation::kWord32);
+ for (int i = 0; i < 4; i++) {
+ rep_builder.AddParam(MachineRepresentation::kWord32);
+ }
+ Int64Lowering r(graph(), machine(), common(), zone(),
+ rep_builder.Build());
+ r.LowerGraph();
+#endif
+
CompilationInfo info("testing", isolate, graph()->zone());
code_ =
Pipeline::GenerateCodeForTesting(&info, descriptor, graph(), nullptr);
@@ -418,9 +431,13 @@ class WasmFunctionCompiler : public HandleAndZoneScope,
Handle<Code> Compile(ModuleEnv* module) {
InitializeDescriptor();
+ CallDescriptor* desc = descriptor_;
+#if !WASM_64
+ desc = module->GetI32WasmCallDescriptor(this->zone(), desc);
titzer 2016/02/18 12:06:23 Same here. You need to use kPointerSize == 4
ahaas 2016/02/18 13:00:18 Done.
+#endif
CompilationInfo info("wasm compile", this->isolate(), this->zone());
Handle<Code> result =
- Pipeline::GenerateCodeForTesting(&info, descriptor_, this->graph());
+ Pipeline::GenerateCodeForTesting(&info, desc, this->graph());
#ifdef ENABLE_DISASSEMBLER
if (!result.is_null() && FLAG_print_opt_code) {
OFStream os(stdout);
« test/cctest/wasm/test-run-wasm.cc ('K') | « test/cctest/wasm/test-run-wasm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698