| Index: src/arm/assembler-arm.h
|
| diff --git a/src/arm/assembler-arm.h b/src/arm/assembler-arm.h
|
| index 04089d378e04b186eeae1945a39e03b94818e3b4..da1e8d164cf69a2ec71daa80d43ec5bbdbc0bbcc 100644
|
| --- a/src/arm/assembler-arm.h
|
| +++ b/src/arm/assembler-arm.h
|
| @@ -702,9 +702,45 @@ class NeonListOperand BASE_EMBEDDED {
|
| NeonListType type_;
|
| };
|
|
|
| +
|
| +// Class used to build a constant pool.
|
| +class ConstantPoolBuilder BASE_EMBEDDED {
|
| + public:
|
| + explicit ConstantPoolBuilder();
|
| + ~ConstantPoolBuilder();
|
| + void AddEntry(Assembler* assm, const RelocInfo& rinfo);
|
| + void Relocate(int pc_delta);
|
| + bool IsEmpty();
|
| + void Populate(Assembler* assm, ConstantPoolArray* constant_pool);
|
| +
|
| + inline int count_of_64bit() const { return count_of_64bit_; }
|
| + inline int count_of_code_ptr() const { return count_of_code_ptr_; }
|
| + inline int count_of_heap_ptr() const { return count_of_heap_ptr_; }
|
| + inline int count_of_32bit() const { return count_of_32bit_; }
|
| +
|
| + private:
|
| + bool Is64BitEntry(RelocInfo::Mode rmode);
|
| + bool Is32BitEntry(RelocInfo::Mode rmode);
|
| + bool IsCodePtrEntry(RelocInfo::Mode rmode);
|
| + bool IsHeapPtrEntry(RelocInfo::Mode rmode);
|
| + void GrowBuffer();
|
| +
|
| + RelocInfo* entries_;
|
| + int* merged_indexes_;
|
| + int buffer_size_;
|
| + int number_of_entries_;
|
| + int count_of_64bit_;
|
| + int count_of_code_ptr_;
|
| + int count_of_heap_ptr_;
|
| + int count_of_32bit_;
|
| +};
|
| +
|
| +
|
| extern const Instr kMovLrPc;
|
| extern const Instr kLdrPCMask;
|
| extern const Instr kLdrPCPattern;
|
| +extern const Instr kLdrPpMask;
|
| +extern const Instr kLdrPpPattern;
|
| extern const Instr kBlxRegMask;
|
| extern const Instr kBlxRegPattern;
|
| extern const Instr kBlxIp;
|
| @@ -1413,6 +1449,8 @@ class Assembler : public AssemblerBase {
|
| static int GetBranchOffset(Instr instr);
|
| static bool IsLdrRegisterImmediate(Instr instr);
|
| static bool IsVldrDRegisterImmediate(Instr instr);
|
| + static bool IsLdrPpImmediateOffset(Instr instr);
|
| + static bool IsVldrDPpImmediateOffset(Instr instr);
|
| static int GetLdrRegisterImmediateOffset(Instr instr);
|
| static int GetVldrDRegisterImmediateOffset(Instr instr);
|
| static Instr SetLdrRegisterImmediateOffset(Instr instr, int offset);
|
| @@ -1458,6 +1496,9 @@ class Assembler : public AssemblerBase {
|
| // Check if is time to emit a constant pool.
|
| void CheckConstPool(bool force_emit, bool require_jump);
|
|
|
| + // Generate the constant pool for the generated code.
|
| + void PopulateConstantPool(ConstantPoolArray* constant_pool);
|
| +
|
| bool can_use_constant_pool() const {
|
| return is_constant_pool_available() && !constant_pool_full_;
|
| }
|
| @@ -1584,6 +1625,8 @@ class Assembler : public AssemblerBase {
|
| // Number of pending reloc info entries in the 64 bits buffer.
|
| int num_pending_64_bit_reloc_info_;
|
|
|
| + ConstantPoolBuilder constant_pool_builder_;
|
| +
|
| // The bound position, before this we cannot do instruction elimination.
|
| int last_bound_pos_;
|
|
|
| @@ -1622,10 +1665,9 @@ class Assembler : public AssemblerBase {
|
| };
|
|
|
| // Record reloc info for current pc_
|
| - void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0,
|
| - UseConstantPoolMode mode = USE_CONSTANT_POOL);
|
| - void RecordRelocInfo(double data);
|
| - void RecordRelocInfoConstantPoolEntryHelper(const RelocInfo& rinfo);
|
| + void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
|
| + void RecordRelocInfo(const RelocInfo& rinfo);
|
| + void ConstantPoolAddEntry(const RelocInfo& rinfo);
|
|
|
| friend class RelocInfo;
|
| friend class CodePatcher;
|
|
|