| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void Jump(Register target); | 126 void Jump(Register target); |
| 127 void JumpToJSEntry(Register target); | 127 void JumpToJSEntry(Register target); |
| 128 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al, | 128 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al, |
| 129 CRegister cr = cr7); | 129 CRegister cr = cr7); |
| 130 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); | 130 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); |
| 131 void Call(Register target); | 131 void Call(Register target); |
| 132 void CallJSEntry(Register target); | 132 void CallJSEntry(Register target); |
| 133 void Call(Address target, RelocInfo::Mode rmode, Condition cond = al); | 133 void Call(Address target, RelocInfo::Mode rmode, Condition cond = al); |
| 134 int CallSize(Handle<Code> code, | 134 int CallSize(Handle<Code> code, |
| 135 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 135 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
| 136 TypeFeedbackId ast_id = TypeFeedbackId::None(), | |
| 137 Condition cond = al); | 136 Condition cond = al); |
| 138 void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 137 void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
| 139 TypeFeedbackId ast_id = TypeFeedbackId::None(), | |
| 140 Condition cond = al); | 138 Condition cond = al); |
| 141 void Ret() { blr(); } | 139 void Ret() { blr(); } |
| 142 void Ret(Condition cond, CRegister cr = cr7) { bclr(cond, cr); } | 140 void Ret(Condition cond, CRegister cr = cr7) { bclr(cond, cr); } |
| 143 | 141 |
| 144 // Emit code that loads |parameter_index|'th parameter from the stack to | 142 // Emit code that loads |parameter_index|'th parameter from the stack to |
| 145 // the register according to the CallInterfaceDescriptor definition. | 143 // the register according to the CallInterfaceDescriptor definition. |
| 146 // |sp_to_caller_sp_offset_in_words| specifies the number of words pushed | 144 // |sp_to_caller_sp_offset_in_words| specifies the number of words pushed |
| 147 // below the caller's sp. | 145 // below the caller's sp. |
| 148 template <class Descriptor> | 146 template <class Descriptor> |
| 149 void LoadParameterFromStack( | 147 void LoadParameterFromStack( |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 void BranchOnNoOverflow(Label* label) { bge(label, cr0); } | 908 void BranchOnNoOverflow(Label* label) { bge(label, cr0); } |
| 911 | 909 |
| 912 void RetOnOverflow(void) { Ret(lt, cr0); } | 910 void RetOnOverflow(void) { Ret(lt, cr0); } |
| 913 | 911 |
| 914 void RetOnNoOverflow(void) { Ret(ge, cr0); } | 912 void RetOnNoOverflow(void) { Ret(ge, cr0); } |
| 915 | 913 |
| 916 // --------------------------------------------------------------------------- | 914 // --------------------------------------------------------------------------- |
| 917 // Runtime calls | 915 // Runtime calls |
| 918 | 916 |
| 919 // Call a code stub. | 917 // Call a code stub. |
| 920 void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(), | 918 void CallStub(CodeStub* stub, |
| 921 Condition cond = al); | 919 Condition cond = al); |
| 922 | 920 |
| 923 // Call a code stub. | 921 // Call a code stub. |
| 924 void TailCallStub(CodeStub* stub, Condition cond = al); | 922 void TailCallStub(CodeStub* stub, Condition cond = al); |
| 925 | 923 |
| 926 // Call a runtime routine. | 924 // Call a runtime routine. |
| 927 void CallRuntime(const Runtime::Function* f, int num_arguments, | 925 void CallRuntime(const Runtime::Function* f, int num_arguments, |
| 928 SaveFPRegsMode save_doubles = kDontSaveFPRegs); | 926 SaveFPRegsMode save_doubles = kDontSaveFPRegs); |
| 929 void CallRuntimeSaveDoubles(Runtime::FunctionId fid) { | 927 void CallRuntimeSaveDoubles(Runtime::FunctionId fid) { |
| 930 const Runtime::Function* function = Runtime::FunctionForId(fid); | 928 const Runtime::Function* function = Runtime::FunctionForId(fid); |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 inline MemOperand NativeContextMemOperand() { | 1541 inline MemOperand NativeContextMemOperand() { |
| 1544 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); | 1542 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); |
| 1545 } | 1543 } |
| 1546 | 1544 |
| 1547 #define ACCESS_MASM(masm) masm-> | 1545 #define ACCESS_MASM(masm) masm-> |
| 1548 | 1546 |
| 1549 } // namespace internal | 1547 } // namespace internal |
| 1550 } // namespace v8 | 1548 } // namespace v8 |
| 1551 | 1549 |
| 1552 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 1550 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
| OLD | NEW |