Chromium Code Reviews| Index: runtime/vm/stub_code_arm.cc |
| diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc |
| index 91b2a3bc9e0651fe60a0a0f9a59ca7ad880416ff..fe60d63b6a3c32cc7771aa63ad1941f2a64cdcac 100644 |
| --- a/runtime/vm/stub_code_arm.cc |
| +++ b/runtime/vm/stub_code_arm.cc |
| @@ -46,7 +46,6 @@ void StubCode::GenerateCallToRuntimeStub(Assembler* assembler) { |
| __ mov(IP, Operand(0)); |
| __ Push(IP); // Push 0 for the PC marker. |
| __ EnterFrame((1 << FP) | (1 << LR), 0); |
| - __ SmiUntag(R4); |
| // Load current Isolate pointer from Context structure into R0. |
| __ ldr(R0, FieldAddress(CTX, Context::isolate_offset())); |
| @@ -1530,7 +1529,23 @@ void StubCode::GenerateLazyCompileStub(Assembler* assembler) { |
| } |
| -void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) { |
| +// R5: Contains an ICData. |
| +void StubCode::GenerateICCallBreakpointStub(Assembler* assembler) { |
| + __ EnterStubFrame(); |
| + __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); |
| + // Preserve arguments descriptor and make room for result. |
| + __ PushList((1 << R0) | (1 << R5)); |
| + __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0); |
| + __ PopList((1 << R0) | (1 << R5)); |
| + __ LeaveStubFrame(); |
| + __ bx(R0); |
| +} |
| + |
| + |
| +// R5: Contains Smi 0 (need to preserve a GC-safe value for the lazy compile |
| +// stub). |
| +// R4: Contains an arguments descriptor. |
| +void StubCode::GenerateClosureCallBreakpointStub(Assembler* assembler) { |
| __ EnterStubFrame(); |
| __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); |
| // Preserve arguments descriptor and make room for result. |
| @@ -1541,6 +1556,22 @@ void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) { |
| __ bx(R0); |
| } |
| +// R5: Garbage or function address. |
| +// R4: Garbage or raw argument count. |
| +void StubCode::GenerateRuntimeCallBreakpointStub(Assembler* assembler) { |
| + __ EnterStubFrame(); |
| + __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); |
| + // Preserve arguments descriptor and make room for result. |
| + __ AndImmediate(R5, R5, ~kSmiTagMask); |
| + __ SmiTag(R4); |
| + __ PushList((1 << R0) | (1 << R4) | (1 << R5)); |
|
Florian Schneider
2014/06/30 09:00:40
Why do you need to preserve R4 and R5 here?
rmacnak
2014/07/01 01:08:51
Don't I need to preserve them for the original stu
Florian Schneider
2014/07/03 19:56:03
I don't think so. When doing a code search for kR
|
| + __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0); |
| + __ PopList((1 << R0) | (1 << R4) | (1 << R5)); |
| + __ SmiUntag(R4); |
| + __ LeaveStubFrame(); |
| + __ bx(R0); |
| +} |
| + |
| // Called only from unoptimized code. All relevant registers have been saved. |
| void StubCode::GenerateDebugStepCheckStub( |