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

Side by Side Diff: src/x64/debug-x64.cc

Issue 296043002: Remove special debug ExternalReferences. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/serialize.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "assembler.h" 9 #include "assembler.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // If this call did not replace a call but patched other code then there will 139 // If this call did not replace a call but patched other code then there will
140 // be an unwanted return address left on the stack. Here we get rid of that. 140 // be an unwanted return address left on the stack. Here we get rid of that.
141 if (convert_call_to_jmp) { 141 if (convert_call_to_jmp) {
142 __ addp(rsp, Immediate(kPCOnStackSize)); 142 __ addp(rsp, Immediate(kPCOnStackSize));
143 } 143 }
144 144
145 // Now that the break point has been handled, resume normal execution by 145 // Now that the break point has been handled, resume normal execution by
146 // jumping to the target address intended by the caller and that was 146 // jumping to the target address intended by the caller and that was
147 // overwritten by the address of DebugBreakXXX. 147 // overwritten by the address of DebugBreakXXX.
148 ExternalReference after_break_target = 148 ExternalReference after_break_target =
149 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate()); 149 ExternalReference::debug_after_break_target_address(masm->isolate());
150 __ Move(kScratchRegister, after_break_target); 150 __ Move(kScratchRegister, after_break_target);
151 __ Jump(Operand(kScratchRegister, 0)); 151 __ Jump(Operand(kScratchRegister, 0));
152 } 152 }
153 153
154 154
155 void Debug::GenerateCallICStubDebugBreak(MacroAssembler* masm) { 155 void Debug::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
156 // Register state for CallICStub 156 // Register state for CallICStub
157 // ----------- S t a t e ------------- 157 // ----------- S t a t e -------------
158 // -- rdx : type feedback slot (smi) 158 // -- rdx : type feedback slot (smi)
159 // -- rdi : function 159 // -- rdi : function
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 278 }
279 279
280 280
281 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { 281 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
282 masm->ret(0); 282 masm->ret(0);
283 } 283 }
284 284
285 285
286 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { 286 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
287 ExternalReference restarter_frame_function_slot = 287 ExternalReference restarter_frame_function_slot =
288 ExternalReference(Debug_Address::RestarterFrameFunctionPointer(), 288 ExternalReference::debug_restarter_frame_function_pointer_address(
289 masm->isolate()); 289 masm->isolate());
290 __ Move(rax, restarter_frame_function_slot); 290 __ Move(rax, restarter_frame_function_slot);
291 __ movp(Operand(rax, 0), Immediate(0)); 291 __ movp(Operand(rax, 0), Immediate(0));
292 292
293 // We do not know our frame height, but set rsp based on rbp. 293 // We do not know our frame height, but set rsp based on rbp.
294 __ leap(rsp, Operand(rbp, -1 * kPointerSize)); 294 __ leap(rsp, Operand(rbp, -1 * kPointerSize));
295 295
296 __ Pop(rdi); // Function. 296 __ Pop(rdi); // Function.
297 __ popq(rbp); 297 __ popq(rbp);
298 298
299 // Load context from the function. 299 // Load context from the function.
300 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); 300 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
301 301
302 // Get function code. 302 // Get function code.
303 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); 303 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
304 __ movp(rdx, FieldOperand(rdx, SharedFunctionInfo::kCodeOffset)); 304 __ movp(rdx, FieldOperand(rdx, SharedFunctionInfo::kCodeOffset));
305 __ leap(rdx, FieldOperand(rdx, Code::kHeaderSize)); 305 __ leap(rdx, FieldOperand(rdx, Code::kHeaderSize));
306 306
307 // Re-run JSFunction, rdi is function, rsi is context. 307 // Re-run JSFunction, rdi is function, rsi is context.
308 __ jmp(rdx); 308 __ jmp(rdx);
309 } 309 }
310 310
311 const bool Debug::kFrameDropperSupported = true; 311 const bool Debug::kFrameDropperSupported = true;
312 312
313 #undef __ 313 #undef __
314 314
315 } } // namespace v8::internal 315 } } // namespace v8::internal
316 316
317 #endif // V8_TARGET_ARCH_X64 317 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698