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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 void Drop(int count); | 149 void Drop(int count); |
150 void Drop(Register count, Register scratch = r0); | 150 void Drop(Register count, Register scratch = r0); |
151 | 151 |
152 void Ret(int drop) { | 152 void Ret(int drop) { |
153 Drop(drop); | 153 Drop(drop); |
154 blr(); | 154 blr(); |
155 } | 155 } |
156 | 156 |
157 void Call(Label* target); | 157 void Call(Label* target); |
158 | 158 |
159 // Emit call to the code we are currently generating. | |
160 void CallSelf() { | |
161 Handle<Code> self(reinterpret_cast<Code**>(CodeObject().location())); | |
162 Call(self, RelocInfo::CODE_TARGET); | |
163 } | |
164 | |
165 // Register move. May do nothing if the registers are identical. | 159 // Register move. May do nothing if the registers are identical. |
166 void Move(Register dst, Smi* smi) { LoadSmiLiteral(dst, smi); } | 160 void Move(Register dst, Smi* smi) { LoadSmiLiteral(dst, smi); } |
167 void Move(Register dst, Handle<Object> value); | 161 void Move(Register dst, Handle<Object> value); |
168 void Move(Register dst, Register src, Condition cond = al); | 162 void Move(Register dst, Register src, Condition cond = al); |
169 void Move(DoubleRegister dst, DoubleRegister src); | 163 void Move(DoubleRegister dst, DoubleRegister src); |
170 | 164 |
171 void MultiPush(RegList regs, Register location = sp); | 165 void MultiPush(RegList regs, Register location = sp); |
172 void MultiPop(RegList regs, Register location = sp); | 166 void MultiPop(RegList regs, Register location = sp); |
173 | 167 |
174 void MultiPushDoubles(RegList dregs, Register location = sp); | 168 void MultiPushDoubles(RegList dregs, Register location = sp); |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 // reset rounding mode to default (kRoundToNearest) | 551 // reset rounding mode to default (kRoundToNearest) |
558 void ResetRoundingMode(); | 552 void ResetRoundingMode(); |
559 | 553 |
560 // These exist to provide portability between 32 and 64bit | 554 // These exist to provide portability between 32 and 64bit |
561 void LoadP(Register dst, const MemOperand& mem, Register scratch = no_reg); | 555 void LoadP(Register dst, const MemOperand& mem, Register scratch = no_reg); |
562 void StoreP(Register src, const MemOperand& mem, Register scratch = no_reg); | 556 void StoreP(Register src, const MemOperand& mem, Register scratch = no_reg); |
563 | 557 |
564 // --------------------------------------------------------------------------- | 558 // --------------------------------------------------------------------------- |
565 // JavaScript invokes | 559 // JavaScript invokes |
566 | 560 |
| 561 // Removes current frame and its arguments from the stack preserving |
| 562 // the arguments and a return address pushed to the stack for the next call. |
| 563 // Both |callee_args_count| and |caller_args_count_reg| do not include |
| 564 // receiver. |callee_args_count| is not modified, |caller_args_count_reg| |
| 565 // is trashed. |
| 566 void PrepareForTailCall(const ParameterCount& callee_args_count, |
| 567 Register caller_args_count_reg, Register scratch0, |
| 568 Register scratch1); |
| 569 |
567 // Invoke the JavaScript function code by either calling or jumping. | 570 // Invoke the JavaScript function code by either calling or jumping. |
568 void InvokeFunctionCode(Register function, Register new_target, | 571 void InvokeFunctionCode(Register function, Register new_target, |
569 const ParameterCount& expected, | 572 const ParameterCount& expected, |
570 const ParameterCount& actual, InvokeFlag flag, | 573 const ParameterCount& actual, InvokeFlag flag, |
571 const CallWrapper& call_wrapper); | 574 const CallWrapper& call_wrapper); |
572 | 575 |
573 void FloodFunctionIfStepping(Register fun, Register new_target, | 576 void FloodFunctionIfStepping(Register fun, Register new_target, |
574 const ParameterCount& expected, | 577 const ParameterCount& expected, |
575 const ParameterCount& actual); | 578 const ParameterCount& actual); |
576 | 579 |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 #define ACCESS_MASM(masm) \ | 1613 #define ACCESS_MASM(masm) \ |
1611 masm->stop(__FILE_LINE__); \ | 1614 masm->stop(__FILE_LINE__); \ |
1612 masm-> | 1615 masm-> |
1613 #else | 1616 #else |
1614 #define ACCESS_MASM(masm) masm-> | 1617 #define ACCESS_MASM(masm) masm-> |
1615 #endif | 1618 #endif |
1616 } // namespace internal | 1619 } // namespace internal |
1617 } // namespace v8 | 1620 } // namespace v8 |
1618 | 1621 |
1619 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 1622 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
OLD | NEW |