| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/debug.h" | 10 #include "src/debug.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 | 102 |
| 103 | 103 |
| 104 #define __ ACCESS_MASM(masm) | 104 #define __ ACCESS_MASM(masm) |
| 105 | 105 |
| 106 | 106 |
| 107 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, | 107 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
| 108 RegList object_regs, | 108 RegList object_regs, |
| 109 RegList non_object_regs) { | 109 RegList non_object_regs) { |
| 110 { | 110 { |
| 111 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 111 FrameScope scope(masm, StackFrame::INTERNAL); |
| 112 | 112 |
| 113 // Load padding words on stack. | 113 // Load padding words on stack. |
| 114 __ LoadSmiLiteral(ip, Smi::FromInt(LiveEdit::kFramePaddingValue)); | 114 __ LoadSmiLiteral(ip, Smi::FromInt(LiveEdit::kFramePaddingValue)); |
| 115 for (int i = 0; i < LiveEdit::kFramePaddingInitialSize; i++) { | 115 for (int i = 0; i < LiveEdit::kFramePaddingInitialSize; i++) { |
| 116 __ push(ip); | 116 __ push(ip); |
| 117 } | 117 } |
| 118 __ LoadSmiLiteral(ip, Smi::FromInt(LiveEdit::kFramePaddingInitialSize)); | 118 __ LoadSmiLiteral(ip, Smi::FromInt(LiveEdit::kFramePaddingInitialSize)); |
| 119 __ push(ip); | 119 __ push(ip); |
| 120 | 120 |
| 121 // Store the registers containing live values on the expression stack to | 121 // Store the registers containing live values on the expression stack to |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 ExternalReference::debug_restarter_frame_function_pointer_address( | 310 ExternalReference::debug_restarter_frame_function_pointer_address( |
| 311 masm->isolate()); | 311 masm->isolate()); |
| 312 __ mov(ip, Operand(restarter_frame_function_slot)); | 312 __ mov(ip, Operand(restarter_frame_function_slot)); |
| 313 __ li(r4, Operand::Zero()); | 313 __ li(r4, Operand::Zero()); |
| 314 __ StoreP(r4, MemOperand(ip, 0)); | 314 __ StoreP(r4, MemOperand(ip, 0)); |
| 315 | 315 |
| 316 // Load the function pointer off of our current stack frame. | 316 // Load the function pointer off of our current stack frame. |
| 317 __ LoadP(r4, MemOperand(fp, StandardFrameConstants::kConstantPoolOffset - | 317 __ LoadP(r4, MemOperand(fp, StandardFrameConstants::kConstantPoolOffset - |
| 318 kPointerSize)); | 318 kPointerSize)); |
| 319 | 319 |
| 320 // Pop return address, frame and constant pool pointer (if | 320 // Pop return address and frame |
| 321 // FLAG_enable_ool_constant_pool). | |
| 322 __ LeaveFrame(StackFrame::INTERNAL); | 321 __ LeaveFrame(StackFrame::INTERNAL); |
| 323 | 322 |
| 324 // Load context from the function. | 323 // Load context from the function. |
| 325 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); | 324 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); |
| 326 | 325 |
| 327 // Get function code. | 326 // Get function code. |
| 328 __ LoadP(ip, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); | 327 __ LoadP(ip, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); |
| 329 __ LoadP(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); | 328 __ LoadP(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); |
| 330 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | 329 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 331 | 330 |
| 332 // Re-run JSFunction, r4 is function, cp is context. | 331 // Re-run JSFunction, r4 is function, cp is context. |
| 333 __ Jump(ip); | 332 __ Jump(ip); |
| 334 } | 333 } |
| 335 | 334 |
| 336 | 335 |
| 337 const bool LiveEdit::kFrameDropperSupported = true; | 336 const bool LiveEdit::kFrameDropperSupported = true; |
| 338 | 337 |
| 339 #undef __ | 338 #undef __ |
| 340 } | 339 } |
| 341 } // namespace v8::internal | 340 } // namespace v8::internal |
| 342 | 341 |
| 343 #endif // V8_TARGET_ARCH_PPC | 342 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |