Chromium Code Reviews| 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); |