| 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" | 5 #include "vm/globals.h" |
| 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/longjump.h" | 9 #include "vm/longjump.h" |
| 10 #include "vm/runtime_entry.h" | 10 #include "vm/runtime_entry.h" |
| (...skipping 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2506 ReserveAlignedFrameSpace(frame_space); | 2506 ReserveAlignedFrameSpace(frame_space); |
| 2507 } | 2507 } |
| 2508 | 2508 |
| 2509 | 2509 |
| 2510 void Assembler::LeaveCallRuntimeFrame() { | 2510 void Assembler::LeaveCallRuntimeFrame() { |
| 2511 // SP might have been modified to reserve space for arguments | 2511 // SP might have been modified to reserve space for arguments |
| 2512 // and ensure proper alignment of the stack frame. | 2512 // and ensure proper alignment of the stack frame. |
| 2513 // We need to restore it before restoring registers. | 2513 // We need to restore it before restoring registers. |
| 2514 const intptr_t kPushedRegistersSize = | 2514 const intptr_t kPushedRegistersSize = |
| 2515 kDartVolatileCpuRegCount * kWordSize + | 2515 kDartVolatileCpuRegCount * kWordSize + |
| 2516 kDartVolatileFpuRegCount * 2 * kWordSize; | 2516 kDartVolatileFpuRegCount * kFpuRegisterSize; |
| 2517 AddImmediate(SP, FP, -kPushedRegistersSize); | 2517 AddImmediate(SP, FP, -kPushedRegistersSize); |
| 2518 | 2518 |
| 2519 // Restore all volatile FPU registers. | 2519 // Restore all volatile FPU registers. |
| 2520 DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg); | 2520 DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg); |
| 2521 DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg); | 2521 DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg); |
| 2522 if ((lastv - firstv + 1) > 16) { | 2522 if ((lastv - firstv + 1) >= 16) { |
| 2523 DRegister mid = static_cast<DRegister>(firstv + 16); | 2523 DRegister mid = static_cast<DRegister>(firstv + 16); |
| 2524 vldmd(IA_W, SP, firstv, 16); | 2524 vldmd(IA_W, SP, firstv, 16); |
| 2525 vldmd(IA_W, SP, mid, lastv - mid + 1); | 2525 vldmd(IA_W, SP, mid, lastv - mid + 1); |
| 2526 } else { | 2526 } else { |
| 2527 vldmd(IA_W, SP, firstv, lastv - firstv + 1); | 2527 vldmd(IA_W, SP, firstv, lastv - firstv + 1); |
| 2528 } | 2528 } |
| 2529 | 2529 |
| 2530 // Restore volatile CPU registers. | 2530 // Restore volatile CPU registers. |
| 2531 LeaveFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR)); | 2531 LeaveFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR)); |
| 2532 } | 2532 } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2730 | 2730 |
| 2731 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2731 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 2732 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 2732 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
| 2733 return fpu_reg_names[reg]; | 2733 return fpu_reg_names[reg]; |
| 2734 } | 2734 } |
| 2735 | 2735 |
| 2736 } // namespace dart | 2736 } // namespace dart |
| 2737 | 2737 |
| 2738 #endif // defined TARGET_ARCH_ARM | 2738 #endif // defined TARGET_ARCH_ARM |
| 2739 | 2739 |
| OLD | NEW |