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/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 const intptr_t saved_result_slot_from_fp = | 344 const intptr_t saved_result_slot_from_fp = |
345 kFirstLocalSlotFromFp + 1 - (kNumberOfCpuRegisters - R0); | 345 kFirstLocalSlotFromFp + 1 - (kNumberOfCpuRegisters - R0); |
346 // Result in R0 is preserved as part of pushing all registers below. | 346 // Result in R0 is preserved as part of pushing all registers below. |
347 | 347 |
348 // TODO(regis): Should we align the stack before pushing the fpu registers? | 348 // TODO(regis): Should we align the stack before pushing the fpu registers? |
349 // If we do, saved_r0_offset_from_fp is not constant anymore. | 349 // If we do, saved_r0_offset_from_fp is not constant anymore. |
350 | 350 |
351 // Push registers in their enumeration order: lowest register number at | 351 // Push registers in their enumeration order: lowest register number at |
352 // lowest address. | 352 // lowest address. |
353 __ PushList(kAllCpuRegistersList); | 353 __ PushList(kAllCpuRegistersList); |
354 ASSERT(kFpuRegisterSize == 2 * kWordSize); | 354 ASSERT(kFpuRegisterSize == 4 * kWordSize); |
355 __ vstmd(DB_W, SP, D0, static_cast<DRegister>(kNumberOfDRegisters - 1)); | 355 __ vstmd(DB_W, SP, D0, static_cast<DRegister>(kNumberOfDRegisters - 1)); |
356 | 356 |
357 __ mov(R0, ShifterOperand(SP)); // Pass address of saved registers block. | 357 __ mov(R0, ShifterOperand(SP)); // Pass address of saved registers block. |
358 __ ReserveAlignedFrameSpace(0); | 358 __ ReserveAlignedFrameSpace(0); |
359 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry); | 359 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry); |
360 // Result (R0) is stack-size (FP - SP) in bytes. | 360 // Result (R0) is stack-size (FP - SP) in bytes. |
361 | 361 |
362 if (preserve_result) { | 362 if (preserve_result) { |
363 // Restore result into R1 temporarily. | 363 // Restore result into R1 temporarily. |
364 __ ldr(R1, Address(FP, saved_result_slot_from_fp * kWordSize)); | 364 __ ldr(R1, Address(FP, saved_result_slot_from_fp * kWordSize)); |
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2091 __ ldr(left, Address(SP, 4 * kWordSize)); | 2091 __ ldr(left, Address(SP, 4 * kWordSize)); |
2092 __ ldr(right, Address(SP, 3 * kWordSize)); | 2092 __ ldr(right, Address(SP, 3 * kWordSize)); |
2093 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2093 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
2094 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); | 2094 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); |
2095 __ Ret(); | 2095 __ Ret(); |
2096 } | 2096 } |
2097 | 2097 |
2098 } // namespace dart | 2098 } // namespace dart |
2099 | 2099 |
2100 #endif // defined TARGET_ARCH_ARM | 2100 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |