| 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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 __ Comment("Stack Check"); | 97 __ Comment("Stack Check"); |
| 98 const intptr_t fp_sp_dist = | 98 const intptr_t fp_sp_dist = |
| 99 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; | 99 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; |
| 100 ASSERT(fp_sp_dist <= 0); | 100 ASSERT(fp_sp_dist <= 0); |
| 101 __ sub(R2, SP, Operand(FP)); | 101 __ sub(R2, SP, Operand(FP)); |
| 102 __ CompareImmediate(R2, fp_sp_dist); | 102 __ CompareImmediate(R2, fp_sp_dist); |
| 103 __ b(&stack_ok, EQ); | 103 __ b(&stack_ok, EQ); |
| 104 __ bkpt(0); | 104 __ bkpt(0); |
| 105 __ Bind(&stack_ok); | 105 __ Bind(&stack_ok); |
| 106 #endif | 106 #endif |
| 107 __ LeaveDartFrame(); | 107 __ LeaveDartFrame(); // Disallows constant pool use. |
| 108 __ Ret(); | 108 __ Ret(); |
| 109 // This ReturnInstr may be emitted out of order by the optimizer. The next |
| 110 // block may be a target expecting a properly set constant pool pointer. |
| 111 __ set_constant_pool_allowed(true); |
| 109 } | 112 } |
| 110 | 113 |
| 111 | 114 |
| 112 static Condition NegateCondition(Condition condition) { | 115 static Condition NegateCondition(Condition condition) { |
| 113 switch (condition) { | 116 switch (condition) { |
| 114 case EQ: return NE; | 117 case EQ: return NE; |
| 115 case NE: return EQ; | 118 case NE: return EQ; |
| 116 case LT: return GE; | 119 case LT: return GE; |
| 117 case LE: return GT; | 120 case LE: return GT; |
| 118 case GT: return LE; | 121 case GT: return LE; |
| (...skipping 6726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6845 1, | 6848 1, |
| 6846 locs()); | 6849 locs()); |
| 6847 __ Drop(1); | 6850 __ Drop(1); |
| 6848 __ Pop(result); | 6851 __ Pop(result); |
| 6849 } | 6852 } |
| 6850 | 6853 |
| 6851 | 6854 |
| 6852 } // namespace dart | 6855 } // namespace dart |
| 6853 | 6856 |
| 6854 #endif // defined TARGET_ARCH_ARM | 6857 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |