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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 __ Bind(&fall_through); | 1089 __ Bind(&fall_through); |
1090 return false; | 1090 return false; |
1091 } | 1091 } |
1092 | 1092 |
1093 | 1093 |
1094 bool Intrinsifier::Smi_bitNegate(Assembler* assembler) { | 1094 bool Intrinsifier::Smi_bitNegate(Assembler* assembler) { |
1095 __ ldr(R0, Address(SP, 0 * kWordSize)); | 1095 __ ldr(R0, Address(SP, 0 * kWordSize)); |
1096 __ mvn(R0, ShifterOperand(R0)); | 1096 __ mvn(R0, ShifterOperand(R0)); |
1097 __ bic(R0, R0, ShifterOperand(kSmiTagMask)); // Remove inverted smi-tag. | 1097 __ bic(R0, R0, ShifterOperand(kSmiTagMask)); // Remove inverted smi-tag. |
1098 __ Ret(); | 1098 __ Ret(); |
1099 return false; | 1099 return true; |
1100 } | 1100 } |
1101 | 1101 |
1102 | 1102 |
1103 // Check if the last argument is a double, jump to label 'is_smi' if smi | 1103 // Check if the last argument is a double, jump to label 'is_smi' if smi |
1104 // (easy to convert to double), otherwise jump to label 'not_double_smi', | 1104 // (easy to convert to double), otherwise jump to label 'not_double_smi', |
1105 // Returns the last argument in R0. | 1105 // Returns the last argument in R0. |
1106 static void TestLastArgumentIsDouble(Assembler* assembler, | 1106 static void TestLastArgumentIsDouble(Assembler* assembler, |
1107 Label* is_smi, | 1107 Label* is_smi, |
1108 Label* not_double_smi) { | 1108 Label* not_double_smi) { |
1109 __ ldr(R0, Address(SP, 0 * kWordSize)); | 1109 __ ldr(R0, Address(SP, 0 * kWordSize)); |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 __ Bind(&ok); | 1687 __ Bind(&ok); |
1688 __ Ret(); | 1688 __ Ret(); |
1689 | 1689 |
1690 __ Bind(&fall_through); | 1690 __ Bind(&fall_through); |
1691 return false; | 1691 return false; |
1692 } | 1692 } |
1693 | 1693 |
1694 } // namespace dart | 1694 } // namespace dart |
1695 | 1695 |
1696 #endif // defined TARGET_ARCH_ARM | 1696 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |