| 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/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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 | 95 |
| 96 // Returns the size of a call in instructions. Note, the value returned is | 96 // Returns the size of a call in instructions. Note, the value returned is |
| 97 // only valid as long as no entries are added to the constant pool between | 97 // only valid as long as no entries are added to the constant pool between |
| 98 // checking the call size and emitting the actual call. | 98 // checking the call size and emitting the actual call. |
| 99 static int CallSize(Register target, Condition cond = al); | 99 static int CallSize(Register target, Condition cond = al); |
| 100 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al); | 100 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al); |
| 101 int CallStubSize(CodeStub* stub, | 101 int CallStubSize(CodeStub* stub, |
| 102 TypeFeedbackId ast_id = TypeFeedbackId::None(), | 102 TypeFeedbackId ast_id = TypeFeedbackId::None(), |
| 103 Condition cond = al); | 103 Condition cond = al); |
| 104 static int CallSizeNotPredictableCodeSize(Isolate* isolate, | |
| 105 Address target, | |
| 106 RelocInfo::Mode rmode, | |
| 107 Condition cond = al); | |
| 108 | 104 |
| 109 // Jump, Call, and Ret pseudo instructions implementing inter-working. | 105 // Jump, Call, and Ret pseudo instructions implementing inter-working. |
| 110 void Jump(Register target, Condition cond = al); | 106 void Jump(Register target, Condition cond = al); |
| 111 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); | 107 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); |
| 112 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); | 108 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); |
| 113 void Call(Register target, Condition cond = al); | 109 void Call(Register target, Condition cond = al); |
| 114 void Call(Address target, RelocInfo::Mode rmode, | 110 void Call(Address target, RelocInfo::Mode rmode, |
| 115 Condition cond = al, | 111 Condition cond = al, |
| 116 TargetAddressStorageMode mode = CAN_INLINE_TARGET_ADDRESS); | 112 TargetAddressStorageMode mode = CAN_INLINE_TARGET_ADDRESS); |
| 113 void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
| 114 TypeFeedbackId ast_id = TypeFeedbackId::None(), Condition cond = al, |
| 115 TargetAddressStorageMode mode = CAN_INLINE_TARGET_ADDRESS); |
| 117 int CallSize(Handle<Code> code, | 116 int CallSize(Handle<Code> code, |
| 118 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 117 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
| 119 TypeFeedbackId ast_id = TypeFeedbackId::None(), | 118 TypeFeedbackId ast_id = TypeFeedbackId::None(), |
| 120 Condition cond = al); | 119 Condition cond = al); |
| 121 void Call(Handle<Code> code, | |
| 122 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | |
| 123 TypeFeedbackId ast_id = TypeFeedbackId::None(), | |
| 124 Condition cond = al, | |
| 125 TargetAddressStorageMode mode = CAN_INLINE_TARGET_ADDRESS); | |
| 126 void Ret(Condition cond = al); | 120 void Ret(Condition cond = al); |
| 127 | 121 |
| 122 // Used for patching in calls to the deoptimizer. |
| 123 void CallDeoptimizer(Address target); |
| 124 static int CallDeoptimizerSize(); |
| 125 |
| 128 // Emit code to discard a non-negative number of pointer-sized elements | 126 // Emit code to discard a non-negative number of pointer-sized elements |
| 129 // from the stack, clobbering only the sp register. | 127 // from the stack, clobbering only the sp register. |
| 130 void Drop(int count, Condition cond = al); | 128 void Drop(int count, Condition cond = al); |
| 131 void Drop(Register count, Condition cond = al); | 129 void Drop(Register count, Condition cond = al); |
| 132 | 130 |
| 133 void Ret(int drop, Condition cond = al); | 131 void Ret(int drop, Condition cond = al); |
| 134 | 132 |
| 135 // Swap two registers. If the scratch register is omitted then a slightly | 133 // Swap two registers. If the scratch register is omitted then a slightly |
| 136 // less efficient form using xor instead of mov is emitted. | 134 // less efficient form using xor instead of mov is emitted. |
| 137 void Swap(Register reg1, | 135 void Swap(Register reg1, |
| (...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1577 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1575 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1578 #else | 1576 #else |
| 1579 #define ACCESS_MASM(masm) masm-> | 1577 #define ACCESS_MASM(masm) masm-> |
| 1580 #endif | 1578 #endif |
| 1581 | 1579 |
| 1582 | 1580 |
| 1583 } // namespace internal | 1581 } // namespace internal |
| 1584 } // namespace v8 | 1582 } // namespace v8 |
| 1585 | 1583 |
| 1586 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1584 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |