| 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 #ifndef V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 5 #ifndef V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
| 6 #define V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 6 #define V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/frames.h" | 10 #include "src/frames.h" |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 void Pop(Register src1, Register src2, Register src3, Register src4, | 331 void Pop(Register src1, Register src2, Register src3, Register src4, |
| 332 Register src5) { | 332 Register src5) { |
| 333 LoadP(src5, MemOperand(sp, 0)); | 333 LoadP(src5, MemOperand(sp, 0)); |
| 334 LoadP(src4, MemOperand(sp, kPointerSize)); | 334 LoadP(src4, MemOperand(sp, kPointerSize)); |
| 335 LoadP(src3, MemOperand(sp, 2 * kPointerSize)); | 335 LoadP(src3, MemOperand(sp, 2 * kPointerSize)); |
| 336 LoadP(src2, MemOperand(sp, 3 * kPointerSize)); | 336 LoadP(src2, MemOperand(sp, 3 * kPointerSize)); |
| 337 LoadP(src1, MemOperand(sp, 4 * kPointerSize)); | 337 LoadP(src1, MemOperand(sp, 4 * kPointerSize)); |
| 338 addi(sp, sp, Operand(5 * kPointerSize)); | 338 addi(sp, sp, Operand(5 * kPointerSize)); |
| 339 } | 339 } |
| 340 | 340 |
| 341 // Push a fixed frame, consisting of lr, fp, context and | 341 // Push a fixed frame, consisting of lr, fp, constant pool. |
| 342 // JS function / marker id if marker_reg is a valid register. | 342 void PushCommonFrame(Register marker_reg = no_reg); |
| 343 void PushFixedFrame(Register marker_reg = no_reg); | 343 |
| 344 void PopFixedFrame(Register marker_reg = no_reg); | 344 // Push a standard frame, consisting of lr, fp, constant pool, |
| 345 // context and JS function |
| 346 void PushStandardFrame(Register function_reg); |
| 347 |
| 348 void PopCommonFrame(Register marker_reg = no_reg); |
| 345 | 349 |
| 346 // Restore caller's frame pointer and return address prior to being | 350 // Restore caller's frame pointer and return address prior to being |
| 347 // overwritten by tail call stack preparation. | 351 // overwritten by tail call stack preparation. |
| 348 void RestoreFrameStateForTailCall(); | 352 void RestoreFrameStateForTailCall(); |
| 349 | 353 |
| 350 // Push and pop the registers that can hold pointers, as defined by the | 354 // Push and pop the registers that can hold pointers, as defined by the |
| 351 // RegList constant kSafepointSavedRegisters. | 355 // RegList constant kSafepointSavedRegisters. |
| 352 void PushSafepointRegisters(); | 356 void PushSafepointRegisters(); |
| 353 void PopSafepointRegisters(); | 357 void PopSafepointRegisters(); |
| 354 // Store value in register src in the safepoint stack slot for | 358 // Store value in register src in the safepoint stack slot for |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 #endif | 415 #endif |
| 412 | 416 |
| 413 #if !V8_TARGET_ARCH_PPC64 | 417 #if !V8_TARGET_ARCH_PPC64 |
| 414 void PairShiftLeft(Register dst_low, Register dst_high, Register src_low, | 418 void PairShiftLeft(Register dst_low, Register dst_high, Register src_low, |
| 415 Register src_high, Register scratch, Register shift); | 419 Register src_high, Register scratch, Register shift); |
| 416 void PairShiftLeft(Register dst_low, Register dst_high, Register src_low, | 420 void PairShiftLeft(Register dst_low, Register dst_high, Register src_low, |
| 417 Register src_high, uint32_t shift); | 421 Register src_high, uint32_t shift); |
| 418 #endif | 422 #endif |
| 419 | 423 |
| 420 // Generates function and stub prologue code. | 424 // Generates function and stub prologue code. |
| 421 void StubPrologue(Register base = no_reg, int prologue_offset = 0); | 425 void StubPrologue(StackFrame::Type type, Register base = no_reg, |
| 426 int prologue_offset = 0); |
| 422 void Prologue(bool code_pre_aging, Register base, int prologue_offset = 0); | 427 void Prologue(bool code_pre_aging, Register base, int prologue_offset = 0); |
| 423 | 428 |
| 424 // Enter exit frame. | 429 // Enter exit frame. |
| 425 // stack_space - extra stack space, used for parameters before call to C. | 430 // stack_space - extra stack space, used for parameters before call to C. |
| 426 // At least one slot (for the return address) should be provided. | 431 // At least one slot (for the return address) should be provided. |
| 427 void EnterExitFrame(bool save_doubles, int stack_space = 1); | 432 void EnterExitFrame(bool save_doubles, int stack_space = 1); |
| 428 | 433 |
| 429 // Leave the current exit frame. Expects the return value in r0. | 434 // Leave the current exit frame. Expects the return value in r0. |
| 430 // Expect the number of values, pushed prior to the exit frame, to | 435 // Expect the number of values, pushed prior to the exit frame, to |
| 431 // remove in a register (or no_reg, if there is nothing to remove). | 436 // remove in a register (or no_reg, if there is nothing to remove). |
| (...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1620 #define ACCESS_MASM(masm) \ | 1625 #define ACCESS_MASM(masm) \ |
| 1621 masm->stop(__FILE_LINE__); \ | 1626 masm->stop(__FILE_LINE__); \ |
| 1622 masm-> | 1627 masm-> |
| 1623 #else | 1628 #else |
| 1624 #define ACCESS_MASM(masm) masm-> | 1629 #define ACCESS_MASM(masm) masm-> |
| 1625 #endif | 1630 #endif |
| 1626 } // namespace internal | 1631 } // namespace internal |
| 1627 } // namespace v8 | 1632 } // namespace v8 |
| 1628 | 1633 |
| 1629 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 1634 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
| OLD | NEW |