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 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2897 // Pending relocation entries are also relative, no need to relocate. | 2897 // Pending relocation entries are also relative, no need to relocate. |
2898 } | 2898 } |
2899 | 2899 |
2900 | 2900 |
2901 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { | 2901 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { |
2902 // We do not try to reuse pool constants. | 2902 // We do not try to reuse pool constants. |
2903 RelocInfo rinfo(reinterpret_cast<byte*>(pc_), rmode, data, NULL); | 2903 RelocInfo rinfo(reinterpret_cast<byte*>(pc_), rmode, data, NULL); |
2904 if (((rmode >= RelocInfo::JS_RETURN) && | 2904 if (((rmode >= RelocInfo::JS_RETURN) && |
2905 (rmode <= RelocInfo::DEBUG_BREAK_SLOT)) || | 2905 (rmode <= RelocInfo::DEBUG_BREAK_SLOT)) || |
2906 (rmode == RelocInfo::INTERNAL_REFERENCE) || | 2906 (rmode == RelocInfo::INTERNAL_REFERENCE) || |
2907 (rmode == RelocInfo::CONST_POOL) || | 2907 (rmode == RelocInfo::CONST_POOL) || (rmode == RelocInfo::VENEER_POOL) || |
2908 (rmode == RelocInfo::VENEER_POOL) || | 2908 (rmode == RelocInfo::DEOPT_REASON) || |
2909 (rmode == RelocInfo::DEOPT_REASON)) { | 2909 (rmode == RelocInfo::GENERATOR_CONTINUATION)) { |
2910 // Adjust code for new modes. | 2910 // Adjust code for new modes. |
2911 DCHECK(RelocInfo::IsDebugBreakSlot(rmode) | 2911 DCHECK(RelocInfo::IsDebugBreakSlot(rmode) || RelocInfo::IsJSReturn(rmode) || |
2912 || RelocInfo::IsJSReturn(rmode) | 2912 RelocInfo::IsComment(rmode) || RelocInfo::IsDeoptReason(rmode) || |
2913 || RelocInfo::IsComment(rmode) | 2913 RelocInfo::IsPosition(rmode) || |
2914 || RelocInfo::IsDeoptReason(rmode) | 2914 RelocInfo::IsInternalReference(rmode) || |
2915 || RelocInfo::IsPosition(rmode) | 2915 RelocInfo::IsConstPool(rmode) || RelocInfo::IsVeneerPool(rmode) || |
2916 || RelocInfo::IsInternalReference(rmode) | 2916 RelocInfo::IsGeneratorContinuation(rmode)); |
2917 || RelocInfo::IsConstPool(rmode) | |
2918 || RelocInfo::IsVeneerPool(rmode)); | |
2919 // These modes do not need an entry in the constant pool. | 2917 // These modes do not need an entry in the constant pool. |
2920 } else { | 2918 } else { |
2921 constpool_.RecordEntry(data, rmode); | 2919 constpool_.RecordEntry(data, rmode); |
2922 // Make sure the constant pool is not emitted in place of the next | 2920 // Make sure the constant pool is not emitted in place of the next |
2923 // instruction for which we just recorded relocation info. | 2921 // instruction for which we just recorded relocation info. |
2924 BlockConstPoolFor(1); | 2922 BlockConstPoolFor(1); |
2925 } | 2923 } |
2926 | 2924 |
2927 if (!RelocInfo::IsNone(rmode)) { | 2925 if (!RelocInfo::IsNone(rmode)) { |
2928 // Don't record external references unless the heap will be serialized. | 2926 // Don't record external references unless the heap will be serialized. |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3172 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3170 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
3173 DCHECK((target_offset >> 48) == 0); | 3171 DCHECK((target_offset >> 48) == 0); |
3174 add(rd, rd, scratch); | 3172 add(rd, rd, scratch); |
3175 } | 3173 } |
3176 | 3174 |
3177 | 3175 |
3178 } // namespace internal | 3176 } // namespace internal |
3179 } // namespace v8 | 3177 } // namespace v8 |
3180 | 3178 |
3181 #endif // V8_TARGET_ARCH_ARM64 | 3179 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |