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

Side by Side Diff: src/compiler/mips64/code-generator-mips64.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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 i.InputDoubleRegister(1)); 1173 i.InputDoubleRegister(1));
1174 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), 1174 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()),
1175 0, 2); 1175 0, 2);
1176 // Move the result in the double result register. 1176 // Move the result in the double result register.
1177 __ MovFromFloatResult(i.OutputDoubleRegister()); 1177 __ MovFromFloatResult(i.OutputDoubleRegister());
1178 break; 1178 break;
1179 } 1179 }
1180 case kMips64AbsD: 1180 case kMips64AbsD:
1181 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1181 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1182 break; 1182 break;
1183 case kMips64LogD: {
1184 // TODO(bmeurer): We should really get rid of this special instruction,
1185 // and generate a CallAddress instruction instead.
1186 FrameScope scope(masm(), StackFrame::MANUAL);
1187 __ PrepareCallCFunction(0, 1, kScratchReg);
1188 __ MovToFloatParameter(i.InputDoubleRegister(0));
1189 __ CallCFunction(ExternalReference::math_log_double_function(isolate()),
1190 0, 1);
1191 // Move the result in the double result register.
1192 __ MovFromFloatResult(i.OutputDoubleRegister());
1193 break;
1194 }
1183 case kMips64SqrtD: { 1195 case kMips64SqrtD: {
1184 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1196 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1185 break; 1197 break;
1186 } 1198 }
1187 case kMips64MaxD: 1199 case kMips64MaxD:
1188 __ max_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1200 __ max_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1189 i.InputDoubleRegister(1)); 1201 i.InputDoubleRegister(1));
1190 break; 1202 break;
1191 case kMips64MinD: 1203 case kMips64MinD:
1192 __ min_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1204 __ min_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 padding_size -= v8::internal::Assembler::kInstrSize; 2262 padding_size -= v8::internal::Assembler::kInstrSize;
2251 } 2263 }
2252 } 2264 }
2253 } 2265 }
2254 2266
2255 #undef __ 2267 #undef __
2256 2268
2257 } // namespace compiler 2269 } // namespace compiler
2258 } // namespace internal 2270 } // namespace internal
2259 } // namespace v8 2271 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698