Commit 9fbf9e28 authored by ahaas's avatar ahaas Committed by Commit bot

[wasm] Use MachineOperator::Float64Log to implement kExprF64Log.

R=titzer@chromium.org, bmeurer@chromium.org

BUG=v8:5065

Review-Url: https://codereview.chromium.org/2036143002
Cr-Commit-Position: refs/heads/master@{#36709}
parent 23ca1e82
......@@ -1351,15 +1351,6 @@ ExternalReference ExternalReference::f64_exp_wrapper_function(
return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_exp_wrapper)));
}
static void f64_log_wrapper(double* param) {
WriteDoubleValue(param, std::log(ReadDoubleValue(param)));
}
ExternalReference ExternalReference::f64_log_wrapper_function(
Isolate* isolate) {
return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_log_wrapper)));
}
static void f64_pow_wrapper(double* param0, double* param1) {
WriteDoubleValue(param0, power_double_double(ReadDoubleValue(param0),
ReadDoubleValue(param1)));
......
......@@ -973,7 +973,6 @@ class ExternalReference BASE_EMBEDDED {
static ExternalReference f64_sin_wrapper_function(Isolate* isolate);
static ExternalReference f64_tan_wrapper_function(Isolate* isolate);
static ExternalReference f64_exp_wrapper_function(Isolate* isolate);
static ExternalReference f64_log_wrapper_function(Isolate* isolate);
static ExternalReference f64_atan2_wrapper_function(Isolate* isolate);
static ExternalReference f64_pow_wrapper_function(Isolate* isolate);
static ExternalReference f64_mod_wrapper_function(Isolate* isolate);
......
......@@ -796,9 +796,9 @@ Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input,
case wasm::kExprF64Exp: {
return BuildF64Exp(input);
}
case wasm::kExprF64Log: {
return BuildF64Log(input);
}
case wasm::kExprF64Log:
op = m->Float64Log();
break;
case wasm::kExprI32ConvertI64:
op = m->TruncateInt64ToInt32();
break;
......@@ -1383,13 +1383,6 @@ Node* WasmGraphBuilder::BuildF64Exp(Node* input) {
return BuildCFuncInstruction(ref, type, input);
}
Node* WasmGraphBuilder::BuildF64Log(Node* input) {
MachineType type = MachineType::Float64();
ExternalReference ref =
ExternalReference::f64_log_wrapper_function(jsgraph()->isolate());
return BuildCFuncInstruction(ref, type, input);
}
Node* WasmGraphBuilder::BuildF64Atan2(Node* left, Node* right) {
MachineType type = MachineType::Float64();
ExternalReference ref =
......
......@@ -280,7 +280,6 @@ class WasmGraphBuilder {
Node* BuildF64Sin(Node* input);
Node* BuildF64Tan(Node* input);
Node* BuildF64Exp(Node* input);
Node* BuildF64Log(Node* input);
Node* BuildF64Pow(Node* left, Node* right);
Node* BuildF64Atan2(Node* left, Node* right);
Node* BuildF64Mod(Node* left, Node* right);
......
......@@ -158,8 +158,6 @@ ExternalReferenceTable::ExternalReferenceTable(Isolate* isolate) {
"f64_tan_wrapper");
Add(ExternalReference::f64_exp_wrapper_function(isolate).address(),
"f64_exp_wrapper");
Add(ExternalReference::f64_log_wrapper_function(isolate).address(),
"f64_log_wrapper");
Add(ExternalReference::f64_pow_wrapper_function(isolate).address(),
"f64_pow_wrapper");
Add(ExternalReference::f64_atan2_wrapper_function(isolate).address(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment