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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
430 | 430 |
431 // Push registers in their enumeration order: lowest register number at | 431 // Push registers in their enumeration order: lowest register number at |
432 // lowest address. | 432 // lowest address. |
433 for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) { | 433 for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) { |
434 if (i == CODE_REG) { | 434 if (i == CODE_REG) { |
435 // Save the original value of CODE_REG pushed before invoking this stub | 435 // Save the original value of CODE_REG pushed before invoking this stub |
436 // instead of the value used to call this stub. | 436 // instead of the value used to call this stub. |
437 COMPILE_ASSERT(IP > CODE_REG); // Assert IP is pushed first. | 437 COMPILE_ASSERT(IP > CODE_REG); // Assert IP is pushed first. |
438 __ ldr(IP, Address(FP, kCallerSpSlotFromFp * kWordSize)); | 438 __ ldr(IP, Address(FP, kCallerSpSlotFromFp * kWordSize)); |
439 __ Push(IP); | 439 __ Push(IP); |
440 } else if (i == SP) { | |
441 // Push(SP) has unpredictable behavior. | |
442 __ mov(IP, Operand(SP)); | |
zra
2015/11/12 20:37:48
Does this clobber IP before it has been saved? Doe
rmacnak
2015/11/12 21:15:52
Hm, this does clobber IP before it has been saved.
Florian Schneider
2015/11/13 09:04:06
IP holds the live value of LR at entry where they
rmacnak
2015/11/13 20:09:12
Removing the assert for the CODE case.
| |
443 __ Push(IP); | |
440 } else { | 444 } else { |
441 __ Push(static_cast<Register>(i)); | 445 __ Push(static_cast<Register>(i)); |
442 } | 446 } |
443 } | 447 } |
444 | 448 |
445 if (TargetCPUFeatures::vfp_supported()) { | 449 if (TargetCPUFeatures::vfp_supported()) { |
446 ASSERT(kFpuRegisterSize == 4 * kWordSize); | 450 ASSERT(kFpuRegisterSize == 4 * kWordSize); |
447 if (kNumberOfDRegisters > 16) { | 451 if (kNumberOfDRegisters > 16) { |
448 __ vstmd(DB_W, SP, D16, kNumberOfDRegisters - 16); | 452 __ vstmd(DB_W, SP, D16, kNumberOfDRegisters - 16); |
449 __ vstmd(DB_W, SP, D0, 16); | 453 __ vstmd(DB_W, SP, D0, 16); |
(...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2135 __ Bind(&miss); | 2139 __ Bind(&miss); |
2136 __ LoadIsolate(R2); | 2140 __ LoadIsolate(R2); |
2137 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); | 2141 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); |
2138 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); | 2142 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); |
2139 __ Ret(); | 2143 __ Ret(); |
2140 } | 2144 } |
2141 | 2145 |
2142 } // namespace dart | 2146 } // namespace dart |
2143 | 2147 |
2144 #endif // defined TARGET_ARCH_ARM | 2148 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |