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

Side by Side Diff: src/compiler/mips/code-generator-mips.cc

Issue 2029413005: [builtins] Migrate Math.log to TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ast/scopes.h" 5 #include "src/ast/scopes.h"
6 #include "src/compiler/code-generator.h" 6 #include "src/compiler/code-generator.h"
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 i.InputDoubleRegister(1)); 1025 i.InputDoubleRegister(1));
1026 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), 1026 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()),
1027 0, 2); 1027 0, 2);
1028 // Move the result in the double result register. 1028 // Move the result in the double result register.
1029 __ MovFromFloatResult(i.OutputDoubleRegister()); 1029 __ MovFromFloatResult(i.OutputDoubleRegister());
1030 break; 1030 break;
1031 } 1031 }
1032 case kMipsAbsD: 1032 case kMipsAbsD:
1033 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1033 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1034 break; 1034 break;
1035 case kMipsLogD: {
1036 // TODO(bmeurer): We should really get rid of this special instruction,
1037 // and generate a CallAddress instruction instead.
1038 FrameScope scope(masm(), StackFrame::MANUAL);
1039 __ PrepareCallCFunction(0, 1, kScratchReg);
1040 __ MovToFloatParameter(i.InputDoubleRegister(0));
1041 __ CallCFunction(ExternalReference::math_log_double_function(isolate()),
1042 0, 1);
1043 // Move the result in the double result register.
1044 __ MovFromFloatResult(i.OutputDoubleRegister());
1045 break;
1046 }
1035 case kMipsSqrtD: { 1047 case kMipsSqrtD: {
1036 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1048 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1037 break; 1049 break;
1038 } 1050 }
1039 case kMipsMaxD: 1051 case kMipsMaxD:
1040 __ max_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1052 __ max_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1041 i.InputDoubleRegister(1)); 1053 i.InputDoubleRegister(1));
1042 break; 1054 break;
1043 case kMipsMinD: 1055 case kMipsMinD:
1044 __ min_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1056 __ min_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 padding_size -= v8::internal::Assembler::kInstrSize; 1992 padding_size -= v8::internal::Assembler::kInstrSize;
1981 } 1993 }
1982 } 1994 }
1983 } 1995 }
1984 1996
1985 #undef __ 1997 #undef __
1986 1998
1987 } // namespace compiler 1999 } // namespace compiler
1988 } // namespace internal 2000 } // namespace internal
1989 } // namespace v8 2001 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698