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/frames.h" | 9 #include "src/frames.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // MacroAssembler implements a collection of frequently used macros. | 70 // MacroAssembler implements a collection of frequently used macros. |
71 class MacroAssembler: public Assembler { | 71 class MacroAssembler: public Assembler { |
72 public: | 72 public: |
73 // The isolate parameter can be NULL if the macro assembler should | 73 // The isolate parameter can be NULL if the macro assembler should |
74 // not use isolate-dependent functionality. In this case, it's the | 74 // not use isolate-dependent functionality. In this case, it's the |
75 // responsibility of the caller to never invoke such function on the | 75 // responsibility of the caller to never invoke such function on the |
76 // macro assembler. | 76 // macro assembler. |
77 MacroAssembler(Isolate* isolate, void* buffer, int size); | 77 MacroAssembler(Isolate* isolate, void* buffer, int size); |
78 | 78 |
79 // Jump, Call, and Ret pseudo instructions implementing inter-working. | 79 |
80 void Jump(Register target, Condition cond = al); | 80 // Returns the size of a call in instructions. Note, the value returned is |
81 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); | 81 // only valid as long as no entries are added to the constant pool between |
82 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); | 82 // checking the call size and emitting the actual call. |
83 static int CallSize(Register target, Condition cond = al); | 83 static int CallSize(Register target, Condition cond = al); |
84 void Call(Register target, Condition cond = al); | |
85 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al); | 84 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al); |
86 int CallStubSize(CodeStub* stub, | 85 int CallStubSize(CodeStub* stub, |
87 TypeFeedbackId ast_id = TypeFeedbackId::None(), | 86 TypeFeedbackId ast_id = TypeFeedbackId::None(), |
88 Condition cond = al); | 87 Condition cond = al); |
89 static int CallSizeNotPredictableCodeSize(Isolate* isolate, | 88 static int CallSizeNotPredictableCodeSize(Isolate* isolate, |
90 Address target, | 89 Address target, |
91 RelocInfo::Mode rmode, | 90 RelocInfo::Mode rmode, |
92 Condition cond = al); | 91 Condition cond = al); |
| 92 |
| 93 // Jump, Call, and Ret pseudo instructions implementing inter-working. |
| 94 void Jump(Register target, Condition cond = al); |
| 95 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); |
| 96 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); |
| 97 void Call(Register target, Condition cond = al); |
93 void Call(Address target, RelocInfo::Mode rmode, | 98 void Call(Address target, RelocInfo::Mode rmode, |
94 Condition cond = al, | 99 Condition cond = al, |
95 TargetAddressStorageMode mode = CAN_INLINE_TARGET_ADDRESS); | 100 TargetAddressStorageMode mode = CAN_INLINE_TARGET_ADDRESS); |
96 int CallSize(Handle<Code> code, | 101 int CallSize(Handle<Code> code, |
97 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 102 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
98 TypeFeedbackId ast_id = TypeFeedbackId::None(), | 103 TypeFeedbackId ast_id = TypeFeedbackId::None(), |
99 Condition cond = al); | 104 Condition cond = al); |
100 void Call(Handle<Code> code, | 105 void Call(Handle<Code> code, |
101 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 106 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
102 TypeFeedbackId ast_id = TypeFeedbackId::None(), | 107 TypeFeedbackId ast_id = TypeFeedbackId::None(), |
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1347 void EmitSeqStringSetCharCheck(Register string, | 1352 void EmitSeqStringSetCharCheck(Register string, |
1348 Register index, | 1353 Register index, |
1349 Register value, | 1354 Register value, |
1350 uint32_t encoding_mask); | 1355 uint32_t encoding_mask); |
1351 | 1356 |
1352 // --------------------------------------------------------------------------- | 1357 // --------------------------------------------------------------------------- |
1353 // Patching helpers. | 1358 // Patching helpers. |
1354 | 1359 |
1355 // Get the location of a relocated constant (its address in the constant pool) | 1360 // Get the location of a relocated constant (its address in the constant pool) |
1356 // from its load site. | 1361 // from its load site. |
1357 void GetRelocatedValueLocation(Register ldr_location, | 1362 void GetRelocatedValueLocation(Register ldr_location, Register result, |
1358 Register result); | 1363 Register scratch); |
1359 | 1364 |
1360 | 1365 |
1361 void ClampUint8(Register output_reg, Register input_reg); | 1366 void ClampUint8(Register output_reg, Register input_reg); |
1362 | 1367 |
1363 void ClampDoubleToUint8(Register result_reg, | 1368 void ClampDoubleToUint8(Register result_reg, |
1364 DwVfpRegister input_reg, | 1369 DwVfpRegister input_reg, |
1365 LowDwVfpRegister double_scratch); | 1370 LowDwVfpRegister double_scratch); |
1366 | 1371 |
1367 | 1372 |
1368 void LoadInstanceDescriptors(Register map, Register descriptors); | 1373 void LoadInstanceDescriptors(Register map, Register descriptors); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1615 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1620 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1616 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1621 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1617 #else | 1622 #else |
1618 #define ACCESS_MASM(masm) masm-> | 1623 #define ACCESS_MASM(masm) masm-> |
1619 #endif | 1624 #endif |
1620 | 1625 |
1621 | 1626 |
1622 } } // namespace v8::internal | 1627 } } // namespace v8::internal |
1623 | 1628 |
1624 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1629 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
OLD | NEW |