Index: src/compiler/mips64/code-generator-mips64.cc |
diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc |
index b122cbf9553af9bf8b2f7e4d07f4510e9d65352a..c254c7d42370d111243b8c6141fd9154140e364b 100644 |
--- a/src/compiler/mips64/code-generator-mips64.cc |
+++ b/src/compiler/mips64/code-generator-mips64.cc |
@@ -1180,6 +1180,18 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
case kMips64AbsD: |
__ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
break; |
+ case kMips64LogD: { |
+ // TODO(bmeurer): We should really get rid of this special instruction, |
+ // and generate a CallAddress instruction instead. |
+ FrameScope scope(masm(), StackFrame::MANUAL); |
+ __ PrepareCallCFunction(0, 1, kScratchReg); |
+ __ MovToFloatParameter(i.InputDoubleRegister(0)); |
+ __ CallCFunction(ExternalReference::math_log_double_function(isolate()), |
+ 0, 1); |
+ // Move the result in the double result register. |
+ __ MovFromFloatResult(i.OutputDoubleRegister()); |
+ break; |
+ } |
case kMips64SqrtD: { |
__ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
break; |