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