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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
9 | 9 |
10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1064 | 1064 |
1065 | 1065 |
1066 void Intrinsifier::Smi_bitNegate(Assembler* assembler) { | 1066 void Intrinsifier::Smi_bitNegate(Assembler* assembler) { |
1067 __ ldr(R0, Address(SP, 0 * kWordSize)); | 1067 __ ldr(R0, Address(SP, 0 * kWordSize)); |
1068 __ mvn(R0, ShifterOperand(R0)); | 1068 __ mvn(R0, ShifterOperand(R0)); |
1069 __ bic(R0, R0, ShifterOperand(kSmiTagMask)); // Remove inverted smi-tag. | 1069 __ bic(R0, R0, ShifterOperand(kSmiTagMask)); // Remove inverted smi-tag. |
1070 __ Ret(); | 1070 __ Ret(); |
1071 } | 1071 } |
1072 | 1072 |
1073 | 1073 |
1074 void Intrinsifier::Smi_bitLength(Assembler* assembler) { | |
srdjan
2013/09/06 15:35:34
Add a TODO?
| |
1075 } | |
Lasse Reichstein Nielsen
2013/09/06 12:40:11
// Intentionally left empty
?
| |
1076 | |
1077 | |
1074 // Check if the last argument is a double, jump to label 'is_smi' if smi | 1078 // Check if the last argument is a double, jump to label 'is_smi' if smi |
1075 // (easy to convert to double), otherwise jump to label 'not_double_smi', | 1079 // (easy to convert to double), otherwise jump to label 'not_double_smi', |
1076 // Returns the last argument in R0. | 1080 // Returns the last argument in R0. |
1077 static void TestLastArgumentIsDouble(Assembler* assembler, | 1081 static void TestLastArgumentIsDouble(Assembler* assembler, |
1078 Label* is_smi, | 1082 Label* is_smi, |
1079 Label* not_double_smi) { | 1083 Label* not_double_smi) { |
1080 __ ldr(R0, Address(SP, 0 * kWordSize)); | 1084 __ ldr(R0, Address(SP, 0 * kWordSize)); |
1081 __ tst(R0, ShifterOperand(kSmiTagMask)); | 1085 __ tst(R0, ShifterOperand(kSmiTagMask)); |
1082 __ b(is_smi, EQ); | 1086 __ b(is_smi, EQ); |
1083 __ CompareClassId(R0, kDoubleCid, R1); | 1087 __ CompareClassId(R0, kDoubleCid, R1); |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1646 | 1650 |
1647 __ Bind(&ok); | 1651 __ Bind(&ok); |
1648 __ Ret(); | 1652 __ Ret(); |
1649 | 1653 |
1650 __ Bind(&fall_through); | 1654 __ Bind(&fall_through); |
1651 } | 1655 } |
1652 | 1656 |
1653 } // namespace dart | 1657 } // namespace dart |
1654 | 1658 |
1655 #endif // defined TARGET_ARCH_ARM | 1659 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |