OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 break; | 1019 break; |
1020 case kTypedDataUint16ArrayCid: | 1020 case kTypedDataUint16ArrayCid: |
1021 case kTwoByteStringCid: | 1021 case kTwoByteStringCid: |
1022 __ lhu(result, element_address); | 1022 __ lhu(result, element_address); |
1023 __ SmiTag(result); | 1023 __ SmiTag(result); |
1024 break; | 1024 break; |
1025 case kTypedDataInt32ArrayCid: { | 1025 case kTypedDataInt32ArrayCid: { |
1026 Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptInt32Load); | 1026 Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptInt32Load); |
1027 __ lw(result, element_address); | 1027 __ lw(result, element_address); |
1028 // Verify that the signed value in 'result' can fit inside a Smi. | 1028 // Verify that the signed value in 'result' can fit inside a Smi. |
1029 __ BranchLess(result, 0xC0000000, deopt); | 1029 __ BranchSignedLess(result, 0xC0000000, deopt); |
1030 __ SmiTag(result); | 1030 __ SmiTag(result); |
1031 } | 1031 } |
1032 break; | 1032 break; |
1033 case kTypedDataUint32ArrayCid: { | 1033 case kTypedDataUint32ArrayCid: { |
1034 Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptUint32Load); | 1034 Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptUint32Load); |
1035 __ lw(result, element_address); | 1035 __ lw(result, element_address); |
1036 // Verify that the unsigned value in 'result' can fit inside a Smi. | 1036 // Verify that the unsigned value in 'result' can fit inside a Smi. |
1037 __ LoadImmediate(TMP1, 0xC0000000); | 1037 __ LoadImmediate(TMP1, 0xC0000000); |
1038 __ and_(CMPRES, result, TMP1); | 1038 __ and_(CMPRES, result, TMP1); |
1039 __ bne(CMPRES, ZR, deopt); | 1039 __ bne(CMPRES, ZR, deopt); |
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2692 &label, | 2692 &label, |
2693 PcDescriptors::kOther, | 2693 PcDescriptors::kOther, |
2694 locs()); | 2694 locs()); |
2695 __ Drop(2); // Discard type arguments and receiver. | 2695 __ Drop(2); // Discard type arguments and receiver. |
2696 } | 2696 } |
2697 | 2697 |
2698 } // namespace dart | 2698 } // namespace dart |
2699 | 2699 |
2700 #endif // defined TARGET_ARCH_MIPS | 2700 #endif // defined TARGET_ARCH_MIPS |
2701 | 2701 |
OLD | NEW |