Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: src/arm64/assembler-arm64.h

Issue 1131783003: Embedded constant pools. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix debug-mode Arm issue. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/assembler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64_ASSEMBLER_ARM64_H_ 5 #ifndef V8_ARM64_ASSEMBLER_ARM64_H_
6 #define V8_ARM64_ASSEMBLER_ARM64_H_ 6 #define V8_ARM64_ASSEMBLER_ARM64_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 // RelocInfo and pools ------------------------------------------------------ 864 // RelocInfo and pools ------------------------------------------------------
865 865
866 // Record relocation information for current pc_. 866 // Record relocation information for current pc_.
867 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); 867 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
868 868
869 // Return the address in the constant pool of the code target address used by 869 // Return the address in the constant pool of the code target address used by
870 // the branch/call instruction at pc. 870 // the branch/call instruction at pc.
871 inline static Address target_pointer_address_at(Address pc); 871 inline static Address target_pointer_address_at(Address pc);
872 872
873 // Read/Modify the code target address in the branch/call instruction at pc. 873 // Read/Modify the code target address in the branch/call instruction at pc.
874 inline static Address target_address_at(Address pc, 874 inline static Address target_address_at(Address pc, Address constant_pool);
875 ConstantPoolArray* constant_pool); 875 inline static void set_target_address_at(
876 inline static void set_target_address_at(Address pc, 876 Address pc, Address constant_pool, Address target,
877 ConstantPoolArray* constant_pool, 877 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED);
878 Address target,
879 ICacheFlushMode icache_flush_mode =
880 FLUSH_ICACHE_IF_NEEDED);
881 static inline Address target_address_at(Address pc, Code* code); 878 static inline Address target_address_at(Address pc, Code* code);
882 static inline void set_target_address_at(Address pc, 879 static inline void set_target_address_at(Address pc,
883 Code* code, 880 Code* code,
884 Address target, 881 Address target,
885 ICacheFlushMode icache_flush_mode = 882 ICacheFlushMode icache_flush_mode =
886 FLUSH_ICACHE_IF_NEEDED); 883 FLUSH_ICACHE_IF_NEEDED);
887 884
888 // Return the code target address at a call site from the return address of 885 // Return the code target address at a call site from the return address of
889 // that call in the instruction stream. 886 // that call in the instruction stream.
890 inline static Address target_address_from_return_address(Address pc); 887 inline static Address target_address_from_return_address(Address pc);
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 void EmitStringData(const char* string); 1757 void EmitStringData(const char* string);
1761 1758
1762 // Pseudo-instructions ------------------------------------------------------ 1759 // Pseudo-instructions ------------------------------------------------------
1763 1760
1764 // Parameters are described in arm64/instructions-arm64.h. 1761 // Parameters are described in arm64/instructions-arm64.h.
1765 void debug(const char* message, uint32_t code, Instr params = BREAK); 1762 void debug(const char* message, uint32_t code, Instr params = BREAK);
1766 1763
1767 // Required by V8. 1764 // Required by V8.
1768 void dd(uint32_t data) { dc32(data); } 1765 void dd(uint32_t data) { dc32(data); }
1769 void db(uint8_t data) { dc8(data); } 1766 void db(uint8_t data) { dc8(data); }
1767 void dq(uint64_t data) { dc64(data); }
1768 void dp(uintptr_t data) { dc64(data); }
1770 1769
1771 // Code generation helpers -------------------------------------------------- 1770 // Code generation helpers --------------------------------------------------
1772 1771
1773 bool IsConstPoolEmpty() const { return constpool_.IsEmpty(); } 1772 bool IsConstPoolEmpty() const { return constpool_.IsEmpty(); }
1774 1773
1775 Instruction* pc() const { return Instruction::Cast(pc_); } 1774 Instruction* pc() const { return Instruction::Cast(pc_); }
1776 1775
1777 Instruction* InstructionAt(ptrdiff_t offset) const { 1776 Instruction* InstructionAt(ptrdiff_t offset) const {
1778 return reinterpret_cast<Instruction*>(buffer_ + offset); 1777 return reinterpret_cast<Instruction*>(buffer_ + offset);
1779 } 1778 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 1901
1903 private: 1902 private:
1904 Assembler* assem_; 1903 Assembler* assem_;
1905 1904
1906 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockConstPoolScope); 1905 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockConstPoolScope);
1907 }; 1906 };
1908 1907
1909 // Check if is time to emit a constant pool. 1908 // Check if is time to emit a constant pool.
1910 void CheckConstPool(bool force_emit, bool require_jump); 1909 void CheckConstPool(bool force_emit, bool require_jump);
1911 1910
1912 // Allocate a constant pool of the correct size for the generated code. 1911 void PatchConstantPoolAccessInstruction(int pc_offset, int offset,
1913 Handle<ConstantPoolArray> NewConstantPool(Isolate* isolate); 1912 ConstantPoolEntry::Access access,
1914 1913 ConstantPoolEntry::Type type) {
1915 // Generate the constant pool for the generated code. 1914 // No embedded constant pool support.
1916 void PopulateConstantPool(ConstantPoolArray* constant_pool); 1915 UNREACHABLE();
1916 }
1917 1917
1918 // Returns true if we should emit a veneer as soon as possible for a branch 1918 // Returns true if we should emit a veneer as soon as possible for a branch
1919 // which can at most reach to specified pc. 1919 // which can at most reach to specified pc.
1920 bool ShouldEmitVeneer(int max_reachable_pc, 1920 bool ShouldEmitVeneer(int max_reachable_pc,
1921 int margin = kVeneerDistanceMargin); 1921 int margin = kVeneerDistanceMargin);
1922 bool ShouldEmitVeneers(int margin = kVeneerDistanceMargin) { 1922 bool ShouldEmitVeneers(int margin = kVeneerDistanceMargin) {
1923 return ShouldEmitVeneer(unresolved_branches_first_limit(), margin); 1923 return ShouldEmitVeneer(unresolved_branches_first_limit(), margin);
1924 } 1924 }
1925 1925
1926 // The maximum code size generated for a veneer. Currently one branch 1926 // The maximum code size generated for a veneer. Currently one branch
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 class EnsureSpace BASE_EMBEDDED { 2320 class EnsureSpace BASE_EMBEDDED {
2321 public: 2321 public:
2322 explicit EnsureSpace(Assembler* assembler) { 2322 explicit EnsureSpace(Assembler* assembler) {
2323 assembler->CheckBufferSpace(); 2323 assembler->CheckBufferSpace();
2324 } 2324 }
2325 }; 2325 };
2326 2326
2327 } } // namespace v8::internal 2327 } } // namespace v8::internal
2328 2328
2329 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ 2329 #endif // V8_ARM64_ASSEMBLER_ARM64_H_
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698