diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc index 031df86c5f..28ea18e2be 100644 --- a/src/compiler/wasm-compiler.cc +++ b/src/compiler/wasm-compiler.cc @@ -2503,7 +2503,8 @@ Node* WasmGraphBuilder::BuildCCall(MachineSignature* sig, Node* function, Node* WasmGraphBuilder::BuildWasmCall(wasm::FunctionSig* sig, Node** args, Node*** rets, wasm::WasmCodePosition position, - Node* instance_node, bool use_retpoline) { + Node* instance_node, + UseRetpoline use_retpoline) { if (instance_node == nullptr) { DCHECK_NOT_NULL(instance_node_); instance_node = instance_node_.get(); @@ -2568,7 +2569,7 @@ Node* WasmGraphBuilder::CallDirect(uint32_t index, Node** args, Node*** rets, jsgraph()->Int32Constant(index * sizeof(Address)), jsgraph()->graph()->start(), jsgraph()->graph()->start()); args[0] = target_node; - return BuildWasmCall(sig, args, rets, position, instance_node); + return BuildWasmCall(sig, args, rets, position, instance_node, kRetpoline); } else { // A call to a function in this module. @@ -2576,7 +2577,7 @@ Node* WasmGraphBuilder::CallDirect(uint32_t index, Node** args, Node*** rets, Address code = static_cast
(index); args[0] = jsgraph()->RelocatableIntPtrConstant(code, RelocInfo::WASM_CALL); - return BuildWasmCall(sig, args, rets, position); + return BuildWasmCall(sig, args, rets, position, nullptr, kNoRetpoline); } } @@ -2654,7 +2655,7 @@ Node* WasmGraphBuilder::CallIndirect(uint32_t sig_index, Node** args, args[0] = target; - return BuildWasmCall(sig, args, rets, position, target_instance); + return BuildWasmCall(sig, args, rets, position, target_instance, kRetpoline); } Node* WasmGraphBuilder::BuildI32Rol(Node* left, Node* right) { @@ -5208,8 +5209,9 @@ class LinkageLocationAllocator { } // namespace // General code uses the above configuration data. -CallDescriptor* GetWasmCallDescriptor(Zone* zone, wasm::FunctionSig* fsig, - bool use_retpoline) { +CallDescriptor* GetWasmCallDescriptor( + Zone* zone, wasm::FunctionSig* fsig, + WasmGraphBuilder::UseRetpoline use_retpoline) { // The '+ 1' here is to accomodate the instance object as first parameter. LocationSignature::Builder locations(zone, fsig->return_count(), fsig->parameter_count() + 1); diff --git a/src/compiler/wasm-compiler.h b/src/compiler/wasm-compiler.h index 14b55c0fd9..d46dc1e493 100644 --- a/src/compiler/wasm-compiler.h +++ b/src/compiler/wasm-compiler.h @@ -149,7 +149,11 @@ struct WasmInstanceCacheNodes { typedef ZoneVector centry_stub, Handle anyref_null,
@@ -387,9 +391,8 @@ class WasmGraphBuilder {
template
Node* BuildCCall(MachineSignature* sig, Node* function, Args... args);
Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args, Node*** rets,
- wasm::WasmCodePosition position,
- Node* instance_node = nullptr,
- bool use_retpoline = false);
+ wasm::WasmCodePosition position, Node* instance_node,
+ UseRetpoline use_retpoline);
Node* BuildF32CopySign(Node* left, Node* right);
Node* BuildF64CopySign(Node* left, Node* right);
@@ -508,7 +511,9 @@ class WasmGraphBuilder {
};
V8_EXPORT_PRIVATE CallDescriptor* GetWasmCallDescriptor(
- Zone* zone, wasm::FunctionSig* signature, bool use_retpoline = false);
+ Zone* zone, wasm::FunctionSig* signature,
+ WasmGraphBuilder::UseRetpoline use_retpoline =
+ WasmGraphBuilder::kNoRetpoline);
V8_EXPORT_PRIVATE CallDescriptor* GetI32WasmCallDescriptor(
Zone* zone, CallDescriptor* call_descriptor);