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" // NOLINT | 5 #include "vm/globals.h" // NOLINT |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
(...skipping 3172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3183 | 3183 |
3184 void Assembler::EnterFrame(RegList regs, intptr_t frame_size) { | 3184 void Assembler::EnterFrame(RegList regs, intptr_t frame_size) { |
3185 if (prologue_offset_ == -1) { | 3185 if (prologue_offset_ == -1) { |
3186 prologue_offset_ = CodeSize(); | 3186 prologue_offset_ = CodeSize(); |
3187 } | 3187 } |
3188 PushList(regs); | 3188 PushList(regs); |
3189 if ((regs & (1 << FP)) != 0) { | 3189 if ((regs & (1 << FP)) != 0) { |
3190 // Set FP to the saved previous FP. | 3190 // Set FP to the saved previous FP. |
3191 add(FP, SP, Operand(4 * NumRegsBelowFP(regs))); | 3191 add(FP, SP, Operand(4 * NumRegsBelowFP(regs))); |
3192 } | 3192 } |
3193 AddImmediate(SP, -frame_size); | 3193 if (frame_size != 0) { |
| 3194 AddImmediate(SP, -frame_size); |
| 3195 } |
3194 } | 3196 } |
3195 | 3197 |
3196 | 3198 |
3197 void Assembler::LeaveFrame(RegList regs) { | 3199 void Assembler::LeaveFrame(RegList regs) { |
3198 ASSERT((regs & (1 << PC)) == 0); // Must not pop PC. | 3200 ASSERT((regs & (1 << PC)) == 0); // Must not pop PC. |
3199 if ((regs & (1 << FP)) != 0) { | 3201 if ((regs & (1 << FP)) != 0) { |
3200 // Use FP to set SP. | 3202 // Use FP to set SP. |
3201 sub(SP, FP, Operand(4 * NumRegsBelowFP(regs))); | 3203 sub(SP, FP, Operand(4 * NumRegsBelowFP(regs))); |
3202 } | 3204 } |
3203 PopList(regs); | 3205 PopList(regs); |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3728 | 3730 |
3729 | 3731 |
3730 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3732 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3731 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3733 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
3732 return fpu_reg_names[reg]; | 3734 return fpu_reg_names[reg]; |
3733 } | 3735 } |
3734 | 3736 |
3735 } // namespace dart | 3737 } // namespace dart |
3736 | 3738 |
3737 #endif // defined TARGET_ARCH_ARM | 3739 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |