| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 const Instr kStrRegFpOffsetPattern = | 543 const Instr kStrRegFpOffsetPattern = |
| 544 al | B26 | Offset | Register::kCode_fp * B16; | 544 al | B26 | Offset | Register::kCode_fp * B16; |
| 545 const Instr kLdrRegFpNegOffsetPattern = | 545 const Instr kLdrRegFpNegOffsetPattern = |
| 546 al | B26 | L | NegOffset | Register::kCode_fp * B16; | 546 al | B26 | L | NegOffset | Register::kCode_fp * B16; |
| 547 const Instr kStrRegFpNegOffsetPattern = | 547 const Instr kStrRegFpNegOffsetPattern = |
| 548 al | B26 | NegOffset | Register::kCode_fp * B16; | 548 al | B26 | NegOffset | Register::kCode_fp * B16; |
| 549 const Instr kLdrStrInstrTypeMask = 0xffff0000; | 549 const Instr kLdrStrInstrTypeMask = 0xffff0000; |
| 550 | 550 |
| 551 Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size) | 551 Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size) |
| 552 : AssemblerBase(isolate_data, buffer, buffer_size), | 552 : AssemblerBase(isolate_data, buffer, buffer_size), |
| 553 recorded_ast_id_(TypeFeedbackId::None()), | |
| 554 pending_32_bit_constants_(), | 553 pending_32_bit_constants_(), |
| 555 pending_64_bit_constants_() { | 554 pending_64_bit_constants_() { |
| 556 pending_32_bit_constants_.reserve(kMinNumPendingConstants); | 555 pending_32_bit_constants_.reserve(kMinNumPendingConstants); |
| 557 pending_64_bit_constants_.reserve(kMinNumPendingConstants); | 556 pending_64_bit_constants_.reserve(kMinNumPendingConstants); |
| 558 reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_); | 557 reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_); |
| 559 next_buffer_check_ = 0; | 558 next_buffer_check_ = 0; |
| 560 code_target_sharing_blocked_nesting_ = 0; | 559 code_target_sharing_blocked_nesting_ = 0; |
| 561 const_pool_blocked_nesting_ = 0; | 560 const_pool_blocked_nesting_ = 0; |
| 562 no_const_pool_before_ = 0; | 561 no_const_pool_before_ = 0; |
| 563 first_const_pool_32_use_ = -1; | 562 first_const_pool_32_use_ = -1; |
| 564 first_const_pool_64_use_ = -1; | 563 first_const_pool_64_use_ = -1; |
| 565 last_bound_pos_ = 0; | 564 last_bound_pos_ = 0; |
| 566 ClearRecordedAstId(); | |
| 567 if (CpuFeatures::IsSupported(VFP32DREGS)) { | 565 if (CpuFeatures::IsSupported(VFP32DREGS)) { |
| 568 // Register objects tend to be abstracted and survive between scopes, so | 566 // Register objects tend to be abstracted and survive between scopes, so |
| 569 // it's awkward to use CpuFeatures::VFP32DREGS with CpuFeatureScope. To make | 567 // it's awkward to use CpuFeatures::VFP32DREGS with CpuFeatureScope. To make |
| 570 // its use consistent with other features, we always enable it if we can. | 568 // its use consistent with other features, we always enable it if we can. |
| 571 EnableCpuFeature(VFP32DREGS); | 569 EnableCpuFeature(VFP32DREGS); |
| 572 } | 570 } |
| 573 } | 571 } |
| 574 | 572 |
| 575 | 573 |
| 576 Assembler::~Assembler() { | 574 Assembler::~Assembler() { |
| (...skipping 4478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5055 } | 5053 } |
| 5056 | 5054 |
| 5057 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { | 5055 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { |
| 5058 if (RelocInfo::IsNone(rmode) || | 5056 if (RelocInfo::IsNone(rmode) || |
| 5059 // Don't record external references unless the heap will be serialized. | 5057 // Don't record external references unless the heap will be serialized. |
| 5060 (rmode == RelocInfo::EXTERNAL_REFERENCE && !serializer_enabled() && | 5058 (rmode == RelocInfo::EXTERNAL_REFERENCE && !serializer_enabled() && |
| 5061 !emit_debug_code())) { | 5059 !emit_debug_code())) { |
| 5062 return; | 5060 return; |
| 5063 } | 5061 } |
| 5064 DCHECK(buffer_space() >= kMaxRelocSize); // too late to grow buffer here | 5062 DCHECK(buffer_space() >= kMaxRelocSize); // too late to grow buffer here |
| 5065 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { | |
| 5066 data = RecordedAstId().ToInt(); | |
| 5067 ClearRecordedAstId(); | |
| 5068 } | |
| 5069 RelocInfo rinfo(pc_, rmode, data, NULL); | 5063 RelocInfo rinfo(pc_, rmode, data, NULL); |
| 5070 reloc_info_writer.Write(&rinfo); | 5064 reloc_info_writer.Write(&rinfo); |
| 5071 } | 5065 } |
| 5072 | 5066 |
| 5073 void Assembler::ConstantPoolAddEntry(int position, RelocInfo::Mode rmode, | 5067 void Assembler::ConstantPoolAddEntry(int position, RelocInfo::Mode rmode, |
| 5074 intptr_t value) { | 5068 intptr_t value) { |
| 5075 DCHECK(rmode != RelocInfo::COMMENT && rmode != RelocInfo::CONST_POOL && | 5069 DCHECK(rmode != RelocInfo::COMMENT && rmode != RelocInfo::CONST_POOL && |
| 5076 rmode != RelocInfo::NONE64); | 5070 rmode != RelocInfo::NONE64); |
| 5077 bool sharing_ok = RelocInfo::IsNone(rmode) || | 5071 bool sharing_ok = RelocInfo::IsNone(rmode) || |
| 5078 (rmode >= RelocInfo::FIRST_SHAREABLE_RELOC_MODE); | 5072 (rmode >= RelocInfo::FIRST_SHAREABLE_RELOC_MODE); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5391 } | 5385 } |
| 5392 | 5386 |
| 5393 void PatchingAssembler::FlushICache(Isolate* isolate) { | 5387 void PatchingAssembler::FlushICache(Isolate* isolate) { |
| 5394 Assembler::FlushICache(isolate, buffer_, buffer_size_ - kGap); | 5388 Assembler::FlushICache(isolate, buffer_, buffer_size_ - kGap); |
| 5395 } | 5389 } |
| 5396 | 5390 |
| 5397 } // namespace internal | 5391 } // namespace internal |
| 5398 } // namespace v8 | 5392 } // namespace v8 |
| 5399 | 5393 |
| 5400 #endif // V8_TARGET_ARCH_ARM | 5394 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |