| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 | 1801 |
| 1802 // The maximum code size generated for a veneer. Currently one branch | 1802 // The maximum code size generated for a veneer. Currently one branch |
| 1803 // instruction. This is for code size checking purposes, and can be extended | 1803 // instruction. This is for code size checking purposes, and can be extended |
| 1804 // in the future for example if we decide to add nops between the veneers. | 1804 // in the future for example if we decide to add nops between the veneers. |
| 1805 static const int kMaxVeneerCodeSize = 1 * kInstructionSize; | 1805 static const int kMaxVeneerCodeSize = 1 * kInstructionSize; |
| 1806 | 1806 |
| 1807 void RecordVeneerPool(int location_offset, int size); | 1807 void RecordVeneerPool(int location_offset, int size); |
| 1808 // Emits veneers for branches that are approaching their maximum range. | 1808 // Emits veneers for branches that are approaching their maximum range. |
| 1809 // If need_protection is true, the veneers are protected by a branch jumping | 1809 // If need_protection is true, the veneers are protected by a branch jumping |
| 1810 // over the code. | 1810 // over the code. |
| 1811 void EmitVeneers(bool need_protection, int margin = kVeneerDistanceMargin); | 1811 void EmitVeneers(bool force_emit, bool need_protection, |
| 1812 int margin = kVeneerDistanceMargin); |
| 1812 void EmitVeneersGuard() { EmitPoolGuard(); } | 1813 void EmitVeneersGuard() { EmitPoolGuard(); } |
| 1813 // Checks whether veneers need to be emitted at this point. | 1814 // Checks whether veneers need to be emitted at this point. |
| 1814 void CheckVeneerPool(bool require_jump, int margin = kVeneerDistanceMargin); | 1815 // If force_emit is set, a veneer is generated for *all* unresolved branches. |
| 1816 void CheckVeneerPool(bool force_emit, bool require_jump, |
| 1817 int margin = kVeneerDistanceMargin); |
| 1815 | 1818 |
| 1816 | 1819 |
| 1817 class BlockPoolsScope { | 1820 class BlockPoolsScope { |
| 1818 public: | 1821 public: |
| 1819 explicit BlockPoolsScope(Assembler* assem) : assem_(assem) { | 1822 explicit BlockPoolsScope(Assembler* assem) : assem_(assem) { |
| 1820 assem_->StartBlockPools(); | 1823 assem_->StartBlockPools(); |
| 1821 } | 1824 } |
| 1822 ~BlockPoolsScope() { | 1825 ~BlockPoolsScope() { |
| 1823 assem_->EndBlockPools(); | 1826 assem_->EndBlockPools(); |
| 1824 } | 1827 } |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2202 class EnsureSpace BASE_EMBEDDED { | 2205 class EnsureSpace BASE_EMBEDDED { |
| 2203 public: | 2206 public: |
| 2204 explicit EnsureSpace(Assembler* assembler) { | 2207 explicit EnsureSpace(Assembler* assembler) { |
| 2205 assembler->CheckBuffer(); | 2208 assembler->CheckBuffer(); |
| 2206 } | 2209 } |
| 2207 }; | 2210 }; |
| 2208 | 2211 |
| 2209 } } // namespace v8::internal | 2212 } } // namespace v8::internal |
| 2210 | 2213 |
| 2211 #endif // V8_A64_ASSEMBLER_A64_H_ | 2214 #endif // V8_A64_ASSEMBLER_A64_H_ |
| OLD | NEW |