OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
5 // met: | 5 // met: |
6 // | 6 // |
7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
10 // copyright notice, this list of conditions and the following | 10 // copyright notice, this list of conditions and the following |
(...skipping 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2666 | 2666 |
2667 bool Assembler::ShouldEmitVeneer(int max_reachable_pc, int margin) { | 2667 bool Assembler::ShouldEmitVeneer(int max_reachable_pc, int margin) { |
2668 // Account for the branch around the veneers and the guard. | 2668 // Account for the branch around the veneers and the guard. |
2669 int protection_offset = 2 * kInstructionSize; | 2669 int protection_offset = 2 * kInstructionSize; |
2670 return pc_offset() > max_reachable_pc - margin - protection_offset - | 2670 return pc_offset() > max_reachable_pc - margin - protection_offset - |
2671 static_cast<int>(unresolved_branches_.size() * kMaxVeneerCodeSize); | 2671 static_cast<int>(unresolved_branches_.size() * kMaxVeneerCodeSize); |
2672 } | 2672 } |
2673 | 2673 |
2674 | 2674 |
2675 void Assembler::RecordVeneerPool(int location_offset, int size) { | 2675 void Assembler::RecordVeneerPool(int location_offset, int size) { |
2676 #ifdef ENABLE_DEBUGGER_SUPPORT | |
2677 RelocInfo rinfo(buffer_ + location_offset, | 2676 RelocInfo rinfo(buffer_ + location_offset, |
2678 RelocInfo::VENEER_POOL, static_cast<intptr_t>(size), | 2677 RelocInfo::VENEER_POOL, static_cast<intptr_t>(size), |
2679 NULL); | 2678 NULL); |
2680 reloc_info_writer.Write(&rinfo); | 2679 reloc_info_writer.Write(&rinfo); |
2681 #endif | |
2682 } | 2680 } |
2683 | 2681 |
2684 | 2682 |
2685 void Assembler::EmitVeneers(bool force_emit, bool need_protection, int margin) { | 2683 void Assembler::EmitVeneers(bool force_emit, bool need_protection, int margin) { |
2686 BlockPoolsScope scope(this); | 2684 BlockPoolsScope scope(this); |
2687 RecordComment("[ Veneers"); | 2685 RecordComment("[ Veneers"); |
2688 | 2686 |
2689 // The exact size of the veneer pool must be recorded (see the comment at the | 2687 // The exact size of the veneer pool must be recorded (see the comment at the |
2690 // declaration site of RecordConstPool()), but computing the number of | 2688 // declaration site of RecordConstPool()), but computing the number of |
2691 // veneers that will be generated is not obvious. So instead we remember the | 2689 // veneers that will be generated is not obvious. So instead we remember the |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2805 void Assembler::RecordDebugBreakSlot() { | 2803 void Assembler::RecordDebugBreakSlot() { |
2806 positions_recorder()->WriteRecordedPositions(); | 2804 positions_recorder()->WriteRecordedPositions(); |
2807 CheckBuffer(); | 2805 CheckBuffer(); |
2808 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); | 2806 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); |
2809 } | 2807 } |
2810 | 2808 |
2811 | 2809 |
2812 void Assembler::RecordConstPool(int size) { | 2810 void Assembler::RecordConstPool(int size) { |
2813 // We only need this for debugger support, to correctly compute offsets in the | 2811 // We only need this for debugger support, to correctly compute offsets in the |
2814 // code. | 2812 // code. |
2815 #ifdef ENABLE_DEBUGGER_SUPPORT | |
2816 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); | 2813 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); |
2817 #endif | |
2818 } | 2814 } |
2819 | 2815 |
2820 | 2816 |
2821 Handle<ConstantPoolArray> Assembler::NewConstantPool(Isolate* isolate) { | 2817 Handle<ConstantPoolArray> Assembler::NewConstantPool(Isolate* isolate) { |
2822 // No out-of-line constant pool support. | 2818 // No out-of-line constant pool support. |
2823 ASSERT(!FLAG_enable_ool_constant_pool); | 2819 ASSERT(!FLAG_enable_ool_constant_pool); |
2824 return isolate->factory()->empty_constant_pool_array(); | 2820 return isolate->factory()->empty_constant_pool_array(); |
2825 } | 2821 } |
2826 | 2822 |
2827 | 2823 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2898 adr(rd, 0); | 2894 adr(rd, 0); |
2899 MovInt64(scratch, target_offset); | 2895 MovInt64(scratch, target_offset); |
2900 add(rd, rd, scratch); | 2896 add(rd, rd, scratch); |
2901 } | 2897 } |
2902 } | 2898 } |
2903 | 2899 |
2904 | 2900 |
2905 } } // namespace v8::internal | 2901 } } // namespace v8::internal |
2906 | 2902 |
2907 #endif // V8_TARGET_ARCH_ARM64 | 2903 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |