OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2897 if (!combined_smi_check) { | 2897 if (!combined_smi_check) { |
2898 __ orr(result, left, Operand(right)); | 2898 __ orr(result, left, Operand(right)); |
2899 } | 2899 } |
2900 break; | 2900 break; |
2901 case Token::kBIT_AND: | 2901 case Token::kBIT_AND: |
2902 __ and_(result, left, Operand(right)); | 2902 __ and_(result, left, Operand(right)); |
2903 break; | 2903 break; |
2904 case Token::kBIT_XOR: | 2904 case Token::kBIT_XOR: |
2905 __ eor(result, left, Operand(right)); | 2905 __ eor(result, left, Operand(right)); |
2906 break; | 2906 break; |
| 2907 case Token::kSHL: |
| 2908 ASSERT(result != left); |
| 2909 ASSERT(result != right); |
| 2910 __ CompareImmediate(right, |
| 2911 reinterpret_cast<int64_t>(Smi::New(Smi::kBits))); |
| 2912 __ b(slow_path->entry_label(), CS); |
| 2913 |
| 2914 __ SmiUntag(TMP, right); |
| 2915 __ lslv(result, left, TMP); |
| 2916 __ asrv(TMP2, result, TMP); |
| 2917 __ CompareRegisters(left, TMP2); |
| 2918 __ b(slow_path->entry_label(), NE); // Overflow. |
| 2919 break; |
| 2920 case Token::kSHR: |
| 2921 ASSERT(result != left); |
| 2922 ASSERT(result != right); |
| 2923 __ CompareImmediate(right, |
| 2924 reinterpret_cast<int64_t>(Smi::New(Smi::kBits))); |
| 2925 __ b(slow_path->entry_label(), CS); |
| 2926 |
| 2927 __ SmiUntag(result, right); |
| 2928 __ SmiUntag(TMP, left); |
| 2929 __ asrv(result, TMP, result); |
| 2930 __ SmiTag(result); |
| 2931 break; |
2907 default: | 2932 default: |
2908 UNIMPLEMENTED(); | 2933 UNIMPLEMENTED(); |
2909 } | 2934 } |
2910 __ Bind(slow_path->exit_label()); | 2935 __ Bind(slow_path->exit_label()); |
2911 } | 2936 } |
2912 | 2937 |
2913 | 2938 |
2914 class CheckedSmiComparisonSlowPath : public SlowPathCode { | 2939 class CheckedSmiComparisonSlowPath : public SlowPathCode { |
2915 public: | 2940 public: |
2916 CheckedSmiComparisonSlowPath(CheckedSmiComparisonInstr* instruction, | 2941 CheckedSmiComparisonSlowPath(CheckedSmiComparisonInstr* instruction, |
(...skipping 3073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5990 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), | 6015 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), |
5991 kGrowRegExpStackRuntimeEntry, 1, locs()); | 6016 kGrowRegExpStackRuntimeEntry, 1, locs()); |
5992 __ Drop(1); | 6017 __ Drop(1); |
5993 __ Pop(result); | 6018 __ Pop(result); |
5994 } | 6019 } |
5995 | 6020 |
5996 | 6021 |
5997 } // namespace dart | 6022 } // namespace dart |
5998 | 6023 |
5999 #endif // defined TARGET_ARCH_ARM64 | 6024 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |