| OLD | NEW |
| 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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 break; | 774 break; |
| 775 case kNotEqual: | 775 case kNotEqual: |
| 776 __ Tbnz(i.InputRegister64(0), i.InputInt6(1), tlabel); | 776 __ Tbnz(i.InputRegister64(0), i.InputInt6(1), tlabel); |
| 777 break; | 777 break; |
| 778 default: | 778 default: |
| 779 UNREACHABLE(); | 779 UNREACHABLE(); |
| 780 } | 780 } |
| 781 } else { | 781 } else { |
| 782 switch (condition) { | 782 switch (condition) { |
| 783 case kUnorderedEqual: | 783 case kUnorderedEqual: |
| 784 __ B(vs, flabel); | 784 // The "eq" condition will not catch the unordered case. |
| 785 // Fall through. | 785 // The jump/fall through to false label will be used if the comparison |
| 786 // was unordered. |
| 786 case kEqual: | 787 case kEqual: |
| 787 __ B(eq, tlabel); | 788 __ B(eq, tlabel); |
| 788 break; | 789 break; |
| 789 case kUnorderedNotEqual: | 790 case kUnorderedNotEqual: |
| 790 // Unordered or not equal can be tested with "ne" condtion. | 791 // Unordered or not equal can be tested with "ne" condtion. |
| 791 // See ARMv8 manual C1.2.3 - Condition Code. | 792 // See ARMv8 manual C1.2.3 - Condition Code. |
| 792 case kNotEqual: | 793 case kNotEqual: |
| 793 __ B(ne, tlabel); | 794 __ B(ne, tlabel); |
| 794 break; | 795 break; |
| 795 case kSignedLessThan: | 796 case kSignedLessThan: |
| 796 __ B(lt, tlabel); | 797 __ B(lt, tlabel); |
| 797 break; | 798 break; |
| 798 case kSignedGreaterThanOrEqual: | 799 case kSignedGreaterThanOrEqual: |
| 799 __ B(ge, tlabel); | 800 __ B(ge, tlabel); |
| 800 break; | 801 break; |
| 801 case kSignedLessThanOrEqual: | 802 case kSignedLessThanOrEqual: |
| 802 __ B(le, tlabel); | 803 __ B(le, tlabel); |
| 803 break; | 804 break; |
| 804 case kSignedGreaterThan: | 805 case kSignedGreaterThan: |
| 805 __ B(gt, tlabel); | 806 __ B(gt, tlabel); |
| 806 break; | 807 break; |
| 807 case kUnorderedLessThan: | 808 case kUnorderedLessThan: |
| 808 __ B(vs, flabel); | 809 // The "lo" condition will not catch the unordered case. |
| 809 // Fall through. | 810 // The jump/fall through to false label will be used if the comparison |
| 811 // was unordered. |
| 810 case kUnsignedLessThan: | 812 case kUnsignedLessThan: |
| 811 __ B(lo, tlabel); | 813 __ B(lo, tlabel); |
| 812 break; | 814 break; |
| 813 case kUnorderedGreaterThanOrEqual: | 815 case kUnorderedGreaterThanOrEqual: |
| 814 // Unordered, greater than or equal can be tested with "hs" condtion. | 816 // Unordered, greater than or equal can be tested with "hs" condtion. |
| 815 // See ARMv8 manual C1.2.3 - Condition Code. | 817 // See ARMv8 manual C1.2.3 - Condition Code. |
| 816 case kUnsignedGreaterThanOrEqual: | 818 case kUnsignedGreaterThanOrEqual: |
| 817 __ B(hs, tlabel); | 819 __ B(hs, tlabel); |
| 818 break; | 820 break; |
| 819 case kUnorderedLessThanOrEqual: | 821 case kUnorderedLessThanOrEqual: |
| 820 __ B(vs, flabel); | 822 // The "ls" condition will not catch the unordered case. |
| 821 // Fall through. | 823 // The jump/fall through to false label will be used if the comparison |
| 824 // was unordered. |
| 822 case kUnsignedLessThanOrEqual: | 825 case kUnsignedLessThanOrEqual: |
| 823 __ B(ls, tlabel); | 826 __ B(ls, tlabel); |
| 824 break; | 827 break; |
| 825 case kUnorderedGreaterThan: | 828 case kUnorderedGreaterThan: |
| 826 // Unordered or greater than can be tested with "hi" condtion. | 829 // Unordered or greater than can be tested with "hi" condtion. |
| 827 // See ARMv8 manual C1.2.3 - Condition Code. | 830 // See ARMv8 manual C1.2.3 - Condition Code. |
| 828 case kUnsignedGreaterThan: | 831 case kUnsignedGreaterThan: |
| 829 __ B(hi, tlabel); | 832 __ B(hi, tlabel); |
| 830 break; | 833 break; |
| 831 case kOverflow: | 834 case kOverflow: |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 } | 1174 } |
| 1172 } | 1175 } |
| 1173 MarkLazyDeoptSite(); | 1176 MarkLazyDeoptSite(); |
| 1174 } | 1177 } |
| 1175 | 1178 |
| 1176 #undef __ | 1179 #undef __ |
| 1177 | 1180 |
| 1178 } // namespace compiler | 1181 } // namespace compiler |
| 1179 } // namespace internal | 1182 } // namespace internal |
| 1180 } // namespace v8 | 1183 } // namespace v8 |
| OLD | NEW |