Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Unified Diff: src/arm64/debug-arm64.cc

Issue 349973007: ARM64: Clean up LiveEdit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/debug-arm64.cc
diff --git a/src/arm64/debug-arm64.cc b/src/arm64/debug-arm64.cc
index 43ebd36df1017352a2d9675906d277933fec1fa9..1a29ffbecd639688d962d35b8a5bae872020f5cf 100644
--- a/src/arm64/debug-arm64.cc
+++ b/src/arm64/debug-arm64.cc
@@ -132,12 +132,10 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
FrameScope scope(masm, StackFrame::INTERNAL);
// Load padding words on stack.
- __ ldr(scratch, Smi::FromInt(LiveEdit::kFramePaddingValue));
- for (int i = 0; i < LiveEdit::kFramePaddingInitialSize; i++) {
- __ push(scratch);
- }
- __ ldr(scratch, Smi::FromInt(LiveEdit::kFramePaddingInitialSize));
- __ push(scratch);
+ __ Mov(scratch, Smi::FromInt(LiveEdit::kFramePaddingValue));
+ __ PushMultipleTimes(scratch, LiveEdit::kFramePaddingInitialSize);
+ __ Mov(scratch, Smi::FromInt(LiveEdit::kFramePaddingInitialSize));
+ __ Push(scratch);
// Any live values (object_regs and non_object_regs) in caller-saved
// registers (or lr) need to be stored on the stack so that their values are
@@ -360,25 +358,28 @@ void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
ExternalReference restarter_frame_function_slot =
ExternalReference::debug_restarter_frame_function_pointer_address(
masm->isolate());
- __ mov(x1, xzr);
- __ Mov(ip0, restarter_frame_function_slot);
- __ str(x1, MemOperand(ip0, 0));
+ UseScratchRegisterScope temps(masm);
+ Register scratch = temps.AcquireX();
+
+ __ Mov(scratch, restarter_frame_function_slot);
+ __ Str(xzr, MemOperand(scratch));
// We do not know our frame height, but set sp based on fp.
- __ sub(jssp, fp, Operand(kPointerSize));
+ __ Sub(masm->StackPointer(), fp, kPointerSize);
+ __ AssertStackConsistency();
__ Pop(x1, fp, lr); // Function, Frame, Return address.
// Load context from the function.
- __ ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset));
+ __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset));
// Get function code.
- __ ldr(ip0, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset));
- __ ldr(ip0, FieldMemOperand(ip0, SharedFunctionInfo::kCodeOffset));
- __ add(ip0, ip0, Operand(Code::kHeaderSize - kHeapObjectTag));
+ __ Ldr(scratch, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset));
+ __ Ldr(scratch, FieldMemOperand(scratch, SharedFunctionInfo::kCodeOffset));
+ __ Add(scratch, scratch, Code::kHeaderSize - kHeapObjectTag);
// Re-run JSFunction, x1 is function, cp is context.
- __ Jump(ip0);
+ __ Br(scratch);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698