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

Side by Side Diff: src/compiler/arm64/code-generator-arm64.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/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/arm64/macro-assembler-arm64.h" 8 #include "src/arm64/macro-assembler-arm64.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler/code-generator-impl.h" 10 #include "src/compiler/code-generator-impl.h"
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 break; 1235 break;
1236 case kArm64Float64Min: 1236 case kArm64Float64Min:
1237 // (a < b) ? a : b 1237 // (a < b) ? a : b
1238 __ Fcmp(i.InputDoubleRegister(0), i.InputDoubleRegister(1)); 1238 __ Fcmp(i.InputDoubleRegister(0), i.InputDoubleRegister(1));
1239 __ Fcsel(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1239 __ Fcsel(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1240 i.InputDoubleRegister(1), lo); 1240 i.InputDoubleRegister(1), lo);
1241 break; 1241 break;
1242 case kArm64Float64Abs: 1242 case kArm64Float64Abs:
1243 __ Fabs(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1243 __ Fabs(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1244 break; 1244 break;
1245 case kArm64Float64Log: {
1246 // TODO(dcarney): implement directly. See note in lithium-codegen-arm64.cc
Yang 2016/06/03 09:41:43 TODO(dcarney)....?
Benedikt Meurer 2016/06/03 09:45:03 Copy and paste :-)
1247 FrameScope scope(masm(), StackFrame::MANUAL);
1248 DCHECK(d0.is(i.InputDoubleRegister(0)));
1249 DCHECK(d0.is(i.OutputDoubleRegister()));
1250 // TODO(dcarney): make sure this saves all relevant registers.
1251 __ CallCFunction(ExternalReference::math_log_double_function(isolate()),
1252 0, 1);
1253 break;
1254 }
1245 case kArm64Float64Neg: 1255 case kArm64Float64Neg:
1246 __ Fneg(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1256 __ Fneg(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1247 break; 1257 break;
1248 case kArm64Float64Sqrt: 1258 case kArm64Float64Sqrt:
1249 __ Fsqrt(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1259 __ Fsqrt(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1250 break; 1260 break;
1251 case kArm64Float32ToFloat64: 1261 case kArm64Float32ToFloat64:
1252 __ Fcvt(i.OutputDoubleRegister(), i.InputDoubleRegister(0).S()); 1262 __ Fcvt(i.OutputDoubleRegister(), i.InputDoubleRegister(0).S());
1253 break; 1263 break;
1254 case kArm64Float64ToFloat32: 1264 case kArm64Float64ToFloat32:
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1917 padding_size -= kInstructionSize; 1927 padding_size -= kInstructionSize;
1918 } 1928 }
1919 } 1929 }
1920 } 1930 }
1921 1931
1922 #undef __ 1932 #undef __
1923 1933
1924 } // namespace compiler 1934 } // namespace compiler
1925 } // namespace internal 1935 } // namespace internal
1926 } // namespace v8 1936 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698