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

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

Issue 1544743004: [turbofan] Add Int64(Add|Sub)WithOverflow support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add truncation to the int64-sub-with-overflow-branch test Created 4 years, 12 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
« no previous file with comments | « src/base/bits.h ('k') | src/compiler/arm64/instruction-selector-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 case kArm64Float64RoundTruncate: 650 case kArm64Float64RoundTruncate:
651 __ Frintz(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 651 __ Frintz(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
652 break; 652 break;
653 case kArm64Float32RoundTiesEven: 653 case kArm64Float32RoundTiesEven:
654 __ Frintn(i.OutputFloat32Register(), i.InputFloat32Register(0)); 654 __ Frintn(i.OutputFloat32Register(), i.InputFloat32Register(0));
655 break; 655 break;
656 case kArm64Float64RoundTiesEven: 656 case kArm64Float64RoundTiesEven:
657 __ Frintn(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 657 __ Frintn(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
658 break; 658 break;
659 case kArm64Add: 659 case kArm64Add:
660 if (FlagsModeField::decode(opcode) != kFlags_none) {
661 __ Adds(i.OutputRegister(), i.InputOrZeroRegister64(0),
662 i.InputOperand2_64(1));
663 } else {
660 __ Add(i.OutputRegister(), i.InputOrZeroRegister64(0), 664 __ Add(i.OutputRegister(), i.InputOrZeroRegister64(0),
661 i.InputOperand2_64(1)); 665 i.InputOperand2_64(1));
666 }
662 break; 667 break;
663 case kArm64Add32: 668 case kArm64Add32:
664 if (FlagsModeField::decode(opcode) != kFlags_none) { 669 if (FlagsModeField::decode(opcode) != kFlags_none) {
665 __ Adds(i.OutputRegister32(), i.InputOrZeroRegister32(0), 670 __ Adds(i.OutputRegister32(), i.InputOrZeroRegister32(0),
666 i.InputOperand2_32(1)); 671 i.InputOperand2_32(1));
667 } else { 672 } else {
668 __ Add(i.OutputRegister32(), i.InputOrZeroRegister32(0), 673 __ Add(i.OutputRegister32(), i.InputOrZeroRegister32(0),
669 i.InputOperand2_32(1)); 674 i.InputOperand2_32(1));
670 } 675 }
671 break; 676 break;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 break; 798 break;
794 case kArm64Eon: 799 case kArm64Eon:
795 __ Eon(i.OutputRegister(), i.InputOrZeroRegister64(0), 800 __ Eon(i.OutputRegister(), i.InputOrZeroRegister64(0),
796 i.InputOperand2_64(1)); 801 i.InputOperand2_64(1));
797 break; 802 break;
798 case kArm64Eon32: 803 case kArm64Eon32:
799 __ Eon(i.OutputRegister32(), i.InputOrZeroRegister32(0), 804 __ Eon(i.OutputRegister32(), i.InputOrZeroRegister32(0),
800 i.InputOperand2_32(1)); 805 i.InputOperand2_32(1));
801 break; 806 break;
802 case kArm64Sub: 807 case kArm64Sub:
808 if (FlagsModeField::decode(opcode) != kFlags_none) {
809 __ Subs(i.OutputRegister(), i.InputOrZeroRegister64(0),
810 i.InputOperand2_64(1));
811 } else {
803 __ Sub(i.OutputRegister(), i.InputOrZeroRegister64(0), 812 __ Sub(i.OutputRegister(), i.InputOrZeroRegister64(0),
804 i.InputOperand2_64(1)); 813 i.InputOperand2_64(1));
814 }
805 break; 815 break;
806 case kArm64Sub32: 816 case kArm64Sub32:
807 if (FlagsModeField::decode(opcode) != kFlags_none) { 817 if (FlagsModeField::decode(opcode) != kFlags_none) {
808 __ Subs(i.OutputRegister32(), i.InputOrZeroRegister32(0), 818 __ Subs(i.OutputRegister32(), i.InputOrZeroRegister32(0),
809 i.InputOperand2_32(1)); 819 i.InputOperand2_32(1));
810 } else { 820 } else {
811 __ Sub(i.OutputRegister32(), i.InputOrZeroRegister32(0), 821 __ Sub(i.OutputRegister32(), i.InputOrZeroRegister32(0),
812 i.InputOperand2_32(1)); 822 i.InputOperand2_32(1));
813 } 823 }
814 break; 824 break;
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 padding_size -= kInstructionSize; 1641 padding_size -= kInstructionSize;
1632 } 1642 }
1633 } 1643 }
1634 } 1644 }
1635 1645
1636 #undef __ 1646 #undef __
1637 1647
1638 } // namespace compiler 1648 } // namespace compiler
1639 } // namespace internal 1649 } // namespace internal
1640 } // namespace v8 1650 } // namespace v8
OLDNEW
« no previous file with comments | « src/base/bits.h ('k') | src/compiler/arm64/instruction-selector-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698