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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 STATIC_ASSERT(sizeof(intptr_t) == sizeof(int64_t)); | 267 STATIC_ASSERT(sizeof(intptr_t) == sizeof(int64_t)); |
268 immediate_ = reinterpret_cast<intptr_t>(obj); | 268 immediate_ = reinterpret_cast<intptr_t>(obj); |
269 rmode_ = RelocInfo::NONE64; | 269 rmode_ = RelocInfo::NONE64; |
270 } | 270 } |
271 } | 271 } |
272 | 272 |
273 | 273 |
274 bool Operand::NeedsRelocation() const { | 274 bool Operand::NeedsRelocation() const { |
275 if (rmode_ == RelocInfo::EXTERNAL_REFERENCE) { | 275 if (rmode_ == RelocInfo::EXTERNAL_REFERENCE) { |
276 #ifdef DEBUG | 276 #ifdef DEBUG |
277 if (!Serializer::enabled()) { | 277 Serializer::TrySetPermanentlyDisabled(); |
278 Serializer::TooLateToEnableNow(); | |
279 } | |
280 #endif | 278 #endif |
281 return Serializer::enabled(); | 279 return Serializer::enabled(); |
282 } | 280 } |
283 | 281 |
284 return !RelocInfo::IsNone(rmode_); | 282 return !RelocInfo::IsNone(rmode_); |
285 } | 283 } |
286 | 284 |
287 | 285 |
288 // Assembler | 286 // Assembler |
289 | 287 |
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1964 Emit(BRK | ImmException(code)); | 1962 Emit(BRK | ImmException(code)); |
1965 } | 1963 } |
1966 | 1964 |
1967 | 1965 |
1968 void Assembler::debug(const char* message, uint32_t code, Instr params) { | 1966 void Assembler::debug(const char* message, uint32_t code, Instr params) { |
1969 #ifdef USE_SIMULATOR | 1967 #ifdef USE_SIMULATOR |
1970 // Don't generate simulator specific code if we are building a snapshot, which | 1968 // Don't generate simulator specific code if we are building a snapshot, which |
1971 // might be run on real hardware. | 1969 // might be run on real hardware. |
1972 if (!Serializer::enabled()) { | 1970 if (!Serializer::enabled()) { |
1973 #ifdef DEBUG | 1971 #ifdef DEBUG |
1974 Serializer::TooLateToEnableNow(); | 1972 Serializer::TrySetPermanentlyDisabled(); |
1975 #endif | 1973 #endif |
1976 // The arguments to the debug marker need to be contiguous in memory, so | 1974 // The arguments to the debug marker need to be contiguous in memory, so |
1977 // make sure we don't try to emit pools. | 1975 // make sure we don't try to emit pools. |
1978 BlockPoolsScope scope(this); | 1976 BlockPoolsScope scope(this); |
1979 | 1977 |
1980 Label start; | 1978 Label start; |
1981 bind(&start); | 1979 bind(&start); |
1982 | 1980 |
1983 // Refer to instructions-arm64.h for a description of the marker and its | 1981 // Refer to instructions-arm64.h for a description of the marker and its |
1984 // arguments. | 1982 // arguments. |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2519 pending_reloc_info_[num_pending_reloc_info_++] = rinfo; | 2517 pending_reloc_info_[num_pending_reloc_info_++] = rinfo; |
2520 // Make sure the constant pool is not emitted in place of the next | 2518 // Make sure the constant pool is not emitted in place of the next |
2521 // instruction for which we just recorded relocation info. | 2519 // instruction for which we just recorded relocation info. |
2522 BlockConstPoolFor(1); | 2520 BlockConstPoolFor(1); |
2523 } | 2521 } |
2524 | 2522 |
2525 if (!RelocInfo::IsNone(rmode)) { | 2523 if (!RelocInfo::IsNone(rmode)) { |
2526 // Don't record external references unless the heap will be serialized. | 2524 // Don't record external references unless the heap will be serialized. |
2527 if (rmode == RelocInfo::EXTERNAL_REFERENCE) { | 2525 if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
2528 #ifdef DEBUG | 2526 #ifdef DEBUG |
2529 if (!Serializer::enabled()) { | 2527 Serializer::TrySetPermanentlyDisabled(); |
2530 Serializer::TooLateToEnableNow(); | |
2531 } | |
2532 #endif | 2528 #endif |
2533 if (!Serializer::enabled() && !emit_debug_code()) { | 2529 if (!Serializer::enabled() && !emit_debug_code()) { |
2534 return; | 2530 return; |
2535 } | 2531 } |
2536 } | 2532 } |
2537 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here | 2533 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here |
2538 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { | 2534 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { |
2539 RelocInfo reloc_info_with_ast_id( | 2535 RelocInfo reloc_info_with_ast_id( |
2540 reinterpret_cast<byte*>(pc_), rmode, RecordedAstId().ToInt(), NULL); | 2536 reinterpret_cast<byte*>(pc_), rmode, RecordedAstId().ToInt(), NULL); |
2541 ClearRecordedAstId(); | 2537 ClearRecordedAstId(); |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2910 adr(rd, 0); | 2906 adr(rd, 0); |
2911 MovInt64(scratch, target_offset); | 2907 MovInt64(scratch, target_offset); |
2912 add(rd, rd, scratch); | 2908 add(rd, rd, scratch); |
2913 } | 2909 } |
2914 } | 2910 } |
2915 | 2911 |
2916 | 2912 |
2917 } } // namespace v8::internal | 2913 } } // namespace v8::internal |
2918 | 2914 |
2919 #endif // V8_TARGET_ARCH_ARM64 | 2915 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |