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 3054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3065 } | 3065 } |
3066 if (force_emit || ShouldEmitVeneers(margin)) { | 3066 if (force_emit || ShouldEmitVeneers(margin)) { |
3067 EmitVeneers(force_emit, require_jump, margin); | 3067 EmitVeneers(force_emit, require_jump, margin); |
3068 } else { | 3068 } else { |
3069 next_veneer_pool_check_ = | 3069 next_veneer_pool_check_ = |
3070 unresolved_branches_first_limit() - kVeneerDistanceCheckMargin; | 3070 unresolved_branches_first_limit() - kVeneerDistanceCheckMargin; |
3071 } | 3071 } |
3072 } | 3072 } |
3073 | 3073 |
3074 | 3074 |
3075 void Assembler::RecordComment(const char* msg) { | |
3076 if (FLAG_code_comments) { | |
3077 CheckBuffer(); | |
3078 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); | |
3079 } | |
3080 } | |
3081 | |
3082 | |
3083 void Assembler::RecordDeoptReason(const int reason, const int raw_position) { | |
3084 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling()) { | |
3085 EnsureSpace ensure_space(this); | |
3086 RecordRelocInfo(RelocInfo::POSITION, raw_position); | |
3087 RecordRelocInfo(RelocInfo::DEOPT_REASON, reason); | |
3088 } | |
3089 } | |
3090 | |
3091 | |
3092 int Assembler::buffer_space() const { | 3075 int Assembler::buffer_space() const { |
3093 return reloc_info_writer.pos() - reinterpret_cast<byte*>(pc_); | 3076 return reloc_info_writer.pos() - reinterpret_cast<byte*>(pc_); |
3094 } | 3077 } |
3095 | 3078 |
3096 | 3079 |
3097 void Assembler::RecordJSReturn() { | |
3098 positions_recorder()->WriteRecordedPositions(); | |
3099 CheckBuffer(); | |
3100 RecordRelocInfo(RelocInfo::JS_RETURN); | |
3101 } | |
3102 | |
3103 | |
3104 void Assembler::RecordDebugBreakSlot() { | |
3105 positions_recorder()->WriteRecordedPositions(); | |
3106 CheckBuffer(); | |
3107 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); | |
3108 } | |
3109 | |
3110 | |
3111 void Assembler::RecordConstPool(int size) { | 3080 void Assembler::RecordConstPool(int size) { |
3112 // We only need this for debugger support, to correctly compute offsets in the | 3081 // We only need this for debugger support, to correctly compute offsets in the |
3113 // code. | 3082 // code. |
3114 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); | 3083 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); |
3115 } | 3084 } |
3116 | 3085 |
3117 | 3086 |
3118 Handle<ConstantPoolArray> Assembler::NewConstantPool(Isolate* isolate) { | 3087 Handle<ConstantPoolArray> Assembler::NewConstantPool(Isolate* isolate) { |
3119 // No out-of-line constant pool support. | 3088 // No out-of-line constant pool support. |
3120 DCHECK(!FLAG_enable_ool_constant_pool); | 3089 DCHECK(!FLAG_enable_ool_constant_pool); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3158 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); | 3127 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); |
3159 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3128 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
3160 DCHECK((target_offset >> 48) == 0); | 3129 DCHECK((target_offset >> 48) == 0); |
3161 add(rd, rd, scratch); | 3130 add(rd, rd, scratch); |
3162 } | 3131 } |
3163 | 3132 |
3164 | 3133 |
3165 } } // namespace v8::internal | 3134 } } // namespace v8::internal |
3166 | 3135 |
3167 #endif // V8_TARGET_ARCH_ARM64 | 3136 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |