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

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

Issue 990963003: [turbofan] Unify Math.floor / Math.ceil optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/macro-assembler-arm64.h" 7 #include "src/arm64/macro-assembler-arm64.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 376 }
377 case kArchRet: 377 case kArchRet:
378 AssembleReturn(); 378 AssembleReturn();
379 break; 379 break;
380 case kArchStackPointer: 380 case kArchStackPointer:
381 __ mov(i.OutputRegister(), masm()->StackPointer()); 381 __ mov(i.OutputRegister(), masm()->StackPointer());
382 break; 382 break;
383 case kArchTruncateDoubleToI: 383 case kArchTruncateDoubleToI:
384 __ TruncateDoubleToI(i.OutputRegister(), i.InputDoubleRegister(0)); 384 __ TruncateDoubleToI(i.OutputRegister(), i.InputDoubleRegister(0));
385 break; 385 break;
386 case kArm64Float64Ceil: 386 case kArm64Float64RoundDown:
387 __ Frintp(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 387 __ Frintm(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
388 break; 388 break;
389 case kArm64Float64Floor: 389 case kArm64Float64RoundTiesAway:
390 __ Frintm(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 390 __ Frinta(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
391 break; 391 break;
392 case kArm64Float64RoundTruncate: 392 case kArm64Float64RoundTruncate:
393 __ Frintz(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 393 __ Frintz(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
394 break; 394 break;
395 case kArm64Float64RoundTiesAway: 395 case kArm64Float64RoundUp:
396 __ Frinta(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 396 __ Frintp(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
397 break; 397 break;
398 case kArm64Add: 398 case kArm64Add:
399 __ Add(i.OutputRegister(), i.InputRegister(0), i.InputOperand2_64(1)); 399 __ Add(i.OutputRegister(), i.InputRegister(0), i.InputOperand2_64(1));
400 break; 400 break;
401 case kArm64Add32: 401 case kArm64Add32:
402 if (FlagsModeField::decode(opcode) != kFlags_none) { 402 if (FlagsModeField::decode(opcode) != kFlags_none) {
403 __ Adds(i.OutputRegister32(), i.InputRegister32(0), 403 __ Adds(i.OutputRegister32(), i.InputRegister32(0),
404 i.InputOperand2_32(1)); 404 i.InputOperand2_32(1));
405 } else { 405 } else {
406 __ Add(i.OutputRegister32(), i.InputRegister32(0), 406 __ Add(i.OutputRegister32(), i.InputRegister32(0),
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 } 1185 }
1186 } 1186 }
1187 MarkLazyDeoptSite(); 1187 MarkLazyDeoptSite();
1188 } 1188 }
1189 1189
1190 #undef __ 1190 #undef __
1191 1191
1192 } // namespace compiler 1192 } // namespace compiler
1193 } // namespace internal 1193 } // namespace internal
1194 } // namespace v8 1194 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/arm64/instruction-codes-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698