| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 == 4 * kWordSize); | 354 ASSERT(kFpuRegisterSize == 4 * kWordSize); |
| 355 __ vstmd(DB_W, SP, D0, static_cast<DRegister>(kNumberOfDRegisters - 1)); | 355 if (kNumberOfDRegisters > 16) { |
| 356 __ vstmd(DB_W, SP, D16, kNumberOfDRegisters - 16); |
| 357 __ vstmd(DB_W, SP, D0, 16); |
| 358 } else { |
| 359 __ vstmd(DB_W, SP, D0, kNumberOfDRegisters); |
| 360 } |
| 356 | 361 |
| 357 __ mov(R0, ShifterOperand(SP)); // Pass address of saved registers block. | 362 __ mov(R0, ShifterOperand(SP)); // Pass address of saved registers block. |
| 358 __ ReserveAlignedFrameSpace(0); | 363 __ ReserveAlignedFrameSpace(0); |
| 359 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry); | 364 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry); |
| 360 // Result (R0) is stack-size (FP - SP) in bytes. | 365 // Result (R0) is stack-size (FP - SP) in bytes. |
| 361 | 366 |
| 362 if (preserve_result) { | 367 if (preserve_result) { |
| 363 // Restore result into R1 temporarily. | 368 // Restore result into R1 temporarily. |
| 364 __ ldr(R1, Address(FP, saved_result_slot_from_fp * kWordSize)); | 369 __ ldr(R1, Address(FP, saved_result_slot_from_fp * kWordSize)); |
| 365 } | 370 } |
| (...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2098 __ ldr(left, Address(SP, 4 * kWordSize)); | 2103 __ ldr(left, Address(SP, 4 * kWordSize)); |
| 2099 __ ldr(right, Address(SP, 3 * kWordSize)); | 2104 __ ldr(right, Address(SP, 3 * kWordSize)); |
| 2100 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2105 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 2101 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); | 2106 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); |
| 2102 __ Ret(); | 2107 __ Ret(); |
| 2103 } | 2108 } |
| 2104 | 2109 |
| 2105 } // namespace dart | 2110 } // namespace dart |
| 2106 | 2111 |
| 2107 #endif // defined TARGET_ARCH_ARM | 2112 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |