OLD | NEW |
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 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 5 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
7 | 7 |
8 #include "src/arm/assembler-arm.h" | 8 #include "src/arm/assembler-arm.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 int jit_cookie() const { return jit_cookie_; } | 95 int jit_cookie() const { return jit_cookie_; } |
96 | 96 |
97 Isolate* isolate() const { return isolate_; } | 97 Isolate* isolate() const { return isolate_; } |
98 | 98 |
99 // Returns the size of a call in instructions. Note, the value returned is | 99 // Returns the size of a call in instructions. Note, the value returned is |
100 // only valid as long as no entries are added to the constant pool between | 100 // only valid as long as no entries are added to the constant pool between |
101 // checking the call size and emitting the actual call. | 101 // checking the call size and emitting the actual call. |
102 static int CallSize(Register target, Condition cond = al); | 102 static int CallSize(Register target, Condition cond = al); |
103 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al); | 103 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al); |
104 int CallStubSize(CodeStub* stub, | 104 int CallStubSize(CodeStub* stub, Condition cond = al); |
105 TypeFeedbackId ast_id = TypeFeedbackId::None(), | |
106 Condition cond = al); | |
107 | 105 |
108 // Jump, Call, and Ret pseudo instructions implementing inter-working. | 106 // Jump, Call, and Ret pseudo instructions implementing inter-working. |
109 void Jump(Register target, Condition cond = al); | 107 void Jump(Register target, Condition cond = al); |
110 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); | 108 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); |
111 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); | 109 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); |
112 void Call(Register target, Condition cond = al); | 110 void Call(Register target, Condition cond = al); |
113 void Call(Address target, RelocInfo::Mode rmode, Condition cond = al, | 111 void Call(Address target, RelocInfo::Mode rmode, Condition cond = al, |
114 TargetAddressStorageMode mode = CAN_INLINE_TARGET_ADDRESS, | 112 TargetAddressStorageMode mode = CAN_INLINE_TARGET_ADDRESS, |
115 bool check_constant_pool = true); | 113 bool check_constant_pool = true); |
116 void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 114 void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
117 TypeFeedbackId ast_id = TypeFeedbackId::None(), Condition cond = al, | 115 Condition cond = al, |
118 TargetAddressStorageMode mode = CAN_INLINE_TARGET_ADDRESS, | 116 TargetAddressStorageMode mode = CAN_INLINE_TARGET_ADDRESS, |
119 bool check_constant_pool = true); | 117 bool check_constant_pool = true); |
120 int CallSize(Handle<Code> code, | 118 int CallSize(Handle<Code> code, |
121 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 119 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
122 TypeFeedbackId ast_id = TypeFeedbackId::None(), | |
123 Condition cond = al); | 120 Condition cond = al); |
124 void Ret(Condition cond = al); | 121 void Ret(Condition cond = al); |
125 | 122 |
126 // Used for patching in calls to the deoptimizer. | 123 // Used for patching in calls to the deoptimizer. |
127 void CallDeoptimizer(Address target); | 124 void CallDeoptimizer(Address target); |
128 static int CallDeoptimizerSize(); | 125 static int CallDeoptimizerSize(); |
129 | 126 |
130 // Emit code that loads |parameter_index|'th parameter from the stack to | 127 // Emit code that loads |parameter_index|'th parameter from the stack to |
131 // the register according to the CallInterfaceDescriptor definition. | 128 // the register according to the CallInterfaceDescriptor definition. |
132 // |sp_to_caller_sp_offset_in_words| specifies the number of words pushed | 129 // |sp_to_caller_sp_offset_in_words| specifies the number of words pushed |
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 void FloatMaxOutOfLine(DwVfpRegister result, DwVfpRegister left, | 1003 void FloatMaxOutOfLine(DwVfpRegister result, DwVfpRegister left, |
1007 DwVfpRegister right); | 1004 DwVfpRegister right); |
1008 void FloatMinOutOfLine(DwVfpRegister result, DwVfpRegister left, | 1005 void FloatMinOutOfLine(DwVfpRegister result, DwVfpRegister left, |
1009 DwVfpRegister right); | 1006 DwVfpRegister right); |
1010 | 1007 |
1011 // --------------------------------------------------------------------------- | 1008 // --------------------------------------------------------------------------- |
1012 // Runtime calls | 1009 // Runtime calls |
1013 | 1010 |
1014 // Call a code stub. | 1011 // Call a code stub. |
1015 void CallStub(CodeStub* stub, | 1012 void CallStub(CodeStub* stub, |
1016 TypeFeedbackId ast_id = TypeFeedbackId::None(), | |
1017 Condition cond = al); | 1013 Condition cond = al); |
1018 | 1014 |
1019 // Call a code stub. | 1015 // Call a code stub. |
1020 void TailCallStub(CodeStub* stub, Condition cond = al); | 1016 void TailCallStub(CodeStub* stub, Condition cond = al); |
1021 | 1017 |
1022 // Call a runtime routine. | 1018 // Call a runtime routine. |
1023 void CallRuntime(const Runtime::Function* f, | 1019 void CallRuntime(const Runtime::Function* f, |
1024 int num_arguments, | 1020 int num_arguments, |
1025 SaveFPRegsMode save_doubles = kDontSaveFPRegs); | 1021 SaveFPRegsMode save_doubles = kDontSaveFPRegs); |
1026 void CallRuntimeSaveDoubles(Runtime::FunctionId fid) { | 1022 void CallRuntimeSaveDoubles(Runtime::FunctionId fid) { |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1437 inline MemOperand NativeContextMemOperand() { | 1433 inline MemOperand NativeContextMemOperand() { |
1438 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); | 1434 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); |
1439 } | 1435 } |
1440 | 1436 |
1441 #define ACCESS_MASM(masm) masm-> | 1437 #define ACCESS_MASM(masm) masm-> |
1442 | 1438 |
1443 } // namespace internal | 1439 } // namespace internal |
1444 } // namespace v8 | 1440 } // namespace v8 |
1445 | 1441 |
1446 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1442 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
OLD | NEW |