| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 return !RelocInfo::IsNone(rmode); | 299 return !RelocInfo::IsNone(rmode); |
| 300 } | 300 } |
| 301 | 301 |
| 302 | 302 |
| 303 // Constant Pool. | 303 // Constant Pool. |
| 304 void ConstPool::RecordEntry(intptr_t data, | 304 void ConstPool::RecordEntry(intptr_t data, |
| 305 RelocInfo::Mode mode) { | 305 RelocInfo::Mode mode) { |
| 306 DCHECK(mode != RelocInfo::COMMENT && mode != RelocInfo::CONST_POOL && | 306 DCHECK(mode != RelocInfo::COMMENT && mode != RelocInfo::CONST_POOL && |
| 307 mode != RelocInfo::VENEER_POOL && | 307 mode != RelocInfo::VENEER_POOL && |
| 308 mode != RelocInfo::CODE_AGE_SEQUENCE && | 308 mode != RelocInfo::CODE_AGE_SEQUENCE && |
| 309 mode != RelocInfo::DEOPT_POSITION && mode != RelocInfo::DEOPT_REASON && | 309 mode != RelocInfo::DEOPT_SCRIPT_OFFSET && |
| 310 mode != RelocInfo::DEOPT_ID); | 310 mode != RelocInfo::DEOPT_INLINING_ID && |
| 311 mode != RelocInfo::DEOPT_REASON && mode != RelocInfo::DEOPT_ID); |
| 311 uint64_t raw_data = static_cast<uint64_t>(data); | 312 uint64_t raw_data = static_cast<uint64_t>(data); |
| 312 int offset = assm_->pc_offset(); | 313 int offset = assm_->pc_offset(); |
| 313 if (IsEmpty()) { | 314 if (IsEmpty()) { |
| 314 first_use_ = offset; | 315 first_use_ = offset; |
| 315 } | 316 } |
| 316 | 317 |
| 317 std::pair<uint64_t, int> entry = std::make_pair(raw_data, offset); | 318 std::pair<uint64_t, int> entry = std::make_pair(raw_data, offset); |
| 318 if (CanBeShared(mode)) { | 319 if (CanBeShared(mode)) { |
| 319 shared_entries_.insert(entry); | 320 shared_entries_.insert(entry); |
| 320 if (shared_entries_.count(entry.first) == 1) { | 321 if (shared_entries_.count(entry.first) == 1) { |
| (...skipping 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2940 } | 2941 } |
| 2941 | 2942 |
| 2942 | 2943 |
| 2943 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { | 2944 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { |
| 2944 // We do not try to reuse pool constants. | 2945 // We do not try to reuse pool constants. |
| 2945 RelocInfo rinfo(isolate(), reinterpret_cast<byte*>(pc_), rmode, data, NULL); | 2946 RelocInfo rinfo(isolate(), reinterpret_cast<byte*>(pc_), rmode, data, NULL); |
| 2946 if (((rmode >= RelocInfo::COMMENT) && | 2947 if (((rmode >= RelocInfo::COMMENT) && |
| 2947 (rmode <= RelocInfo::DEBUG_BREAK_SLOT_AT_TAIL_CALL)) || | 2948 (rmode <= RelocInfo::DEBUG_BREAK_SLOT_AT_TAIL_CALL)) || |
| 2948 (rmode == RelocInfo::INTERNAL_REFERENCE) || | 2949 (rmode == RelocInfo::INTERNAL_REFERENCE) || |
| 2949 (rmode == RelocInfo::CONST_POOL) || (rmode == RelocInfo::VENEER_POOL) || | 2950 (rmode == RelocInfo::CONST_POOL) || (rmode == RelocInfo::VENEER_POOL) || |
| 2950 (rmode == RelocInfo::DEOPT_POSITION) || | 2951 (rmode == RelocInfo::DEOPT_SCRIPT_OFFSET) || |
| 2952 (rmode == RelocInfo::DEOPT_INLINING_ID) || |
| 2951 (rmode == RelocInfo::DEOPT_REASON) || (rmode == RelocInfo::DEOPT_ID) || | 2953 (rmode == RelocInfo::DEOPT_REASON) || (rmode == RelocInfo::DEOPT_ID) || |
| 2952 (rmode == RelocInfo::GENERATOR_CONTINUATION)) { | 2954 (rmode == RelocInfo::GENERATOR_CONTINUATION)) { |
| 2953 // Adjust code for new modes. | 2955 // Adjust code for new modes. |
| 2954 DCHECK(RelocInfo::IsDebugBreakSlot(rmode) || RelocInfo::IsComment(rmode) || | 2956 DCHECK(RelocInfo::IsDebugBreakSlot(rmode) || RelocInfo::IsComment(rmode) || |
| 2955 RelocInfo::IsDeoptReason(rmode) || RelocInfo::IsDeoptId(rmode) || | 2957 RelocInfo::IsDeoptReason(rmode) || RelocInfo::IsDeoptId(rmode) || |
| 2956 RelocInfo::IsDeoptPosition(rmode) || | 2958 RelocInfo::IsDeoptPosition(rmode) || |
| 2957 RelocInfo::IsInternalReference(rmode) || | 2959 RelocInfo::IsInternalReference(rmode) || |
| 2958 RelocInfo::IsConstPool(rmode) || RelocInfo::IsVeneerPool(rmode) || | 2960 RelocInfo::IsConstPool(rmode) || RelocInfo::IsVeneerPool(rmode) || |
| 2959 RelocInfo::IsGeneratorContinuation(rmode)); | 2961 RelocInfo::IsGeneratorContinuation(rmode)); |
| 2960 // These modes do not need an entry in the constant pool. | 2962 // These modes do not need an entry in the constant pool. |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3212 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3214 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
| 3213 DCHECK((target_offset >> 48) == 0); | 3215 DCHECK((target_offset >> 48) == 0); |
| 3214 add(rd, rd, scratch); | 3216 add(rd, rd, scratch); |
| 3215 } | 3217 } |
| 3216 | 3218 |
| 3217 | 3219 |
| 3218 } // namespace internal | 3220 } // namespace internal |
| 3219 } // namespace v8 | 3221 } // namespace v8 |
| 3220 | 3222 |
| 3221 #endif // V8_TARGET_ARCH_ARM64 | 3223 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |