| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/x64/assembler-x64.h" | 5 #include "src/x64/assembler-x64.h" |
| 6 | 6 |
| 7 #include <cstring> | 7 #include <cstring> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
| 10 | 10 |
| (...skipping 3865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3876 emit(data); | 3876 emit(data); |
| 3877 } | 3877 } |
| 3878 | 3878 |
| 3879 | 3879 |
| 3880 void Assembler::dd(uint32_t data) { | 3880 void Assembler::dd(uint32_t data) { |
| 3881 EnsureSpace ensure_space(this); | 3881 EnsureSpace ensure_space(this); |
| 3882 emitl(data); | 3882 emitl(data); |
| 3883 } | 3883 } |
| 3884 | 3884 |
| 3885 | 3885 |
| 3886 void Assembler::dq(uint64_t data) { | |
| 3887 EnsureSpace ensure_space(this); | |
| 3888 emitq(data); | |
| 3889 } | |
| 3890 | |
| 3891 | |
| 3892 void Assembler::dq(Label* label) { | 3886 void Assembler::dq(Label* label) { |
| 3893 EnsureSpace ensure_space(this); | 3887 EnsureSpace ensure_space(this); |
| 3894 if (label->is_bound()) { | 3888 if (label->is_bound()) { |
| 3895 internal_reference_positions_.push_back(pc_offset()); | 3889 internal_reference_positions_.push_back(pc_offset()); |
| 3896 emitp(buffer_ + label->pos(), RelocInfo::INTERNAL_REFERENCE); | 3890 emitp(buffer_ + label->pos(), RelocInfo::INTERNAL_REFERENCE); |
| 3897 } else { | 3891 } else { |
| 3898 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); | 3892 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); |
| 3899 emitl(0); // Zero for the first 32bit marks it as 64bit absolute address. | 3893 emitl(0); // Zero for the first 32bit marks it as 64bit absolute address. |
| 3900 if (label->is_linked()) { | 3894 if (label->is_linked()) { |
| 3901 emitl(label->pos()); | 3895 emitl(label->pos()); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3920 return; | 3914 return; |
| 3921 } else if (rmode == RelocInfo::CODE_AGE_SEQUENCE) { | 3915 } else if (rmode == RelocInfo::CODE_AGE_SEQUENCE) { |
| 3922 // Don't record psuedo relocation info for code age sequence mode. | 3916 // Don't record psuedo relocation info for code age sequence mode. |
| 3923 return; | 3917 return; |
| 3924 } | 3918 } |
| 3925 RelocInfo rinfo(pc_, rmode, data, NULL); | 3919 RelocInfo rinfo(pc_, rmode, data, NULL); |
| 3926 reloc_info_writer.Write(&rinfo); | 3920 reloc_info_writer.Write(&rinfo); |
| 3927 } | 3921 } |
| 3928 | 3922 |
| 3929 | 3923 |
| 3924 Handle<ConstantPoolArray> Assembler::NewConstantPool(Isolate* isolate) { |
| 3925 // No out-of-line constant pool support. |
| 3926 DCHECK(!FLAG_enable_ool_constant_pool); |
| 3927 return isolate->factory()->empty_constant_pool_array(); |
| 3928 } |
| 3929 |
| 3930 |
| 3931 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { |
| 3932 // No out-of-line constant pool support. |
| 3933 DCHECK(!FLAG_enable_ool_constant_pool); |
| 3934 return; |
| 3935 } |
| 3936 |
| 3937 |
| 3930 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | | 3938 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | |
| 3931 1 << RelocInfo::RUNTIME_ENTRY | | 3939 1 << RelocInfo::RUNTIME_ENTRY | |
| 3932 1 << RelocInfo::INTERNAL_REFERENCE | | 3940 1 << RelocInfo::INTERNAL_REFERENCE | |
| 3933 1 << RelocInfo::CODE_AGE_SEQUENCE; | 3941 1 << RelocInfo::CODE_AGE_SEQUENCE; |
| 3934 | 3942 |
| 3935 | 3943 |
| 3936 bool RelocInfo::IsCodedSpecially() { | 3944 bool RelocInfo::IsCodedSpecially() { |
| 3937 // The deserializer needs to know whether a pointer is specially coded. Being | 3945 // The deserializer needs to know whether a pointer is specially coded. Being |
| 3938 // specially coded on x64 means that it is a relative 32 bit address, as used | 3946 // specially coded on x64 means that it is a relative 32 bit address, as used |
| 3939 // by branch instructions. | 3947 // by branch instructions. |
| 3940 return (1 << rmode_) & kApplyMask; | 3948 return (1 << rmode_) & kApplyMask; |
| 3941 } | 3949 } |
| 3942 | 3950 |
| 3943 | 3951 |
| 3944 bool RelocInfo::IsInConstantPool() { | 3952 bool RelocInfo::IsInConstantPool() { |
| 3945 return false; | 3953 return false; |
| 3946 } | 3954 } |
| 3947 | 3955 |
| 3948 | 3956 |
| 3949 } // namespace internal | 3957 } // namespace internal |
| 3950 } // namespace v8 | 3958 } // namespace v8 |
| 3951 | 3959 |
| 3952 #endif // V8_TARGET_ARCH_X64 | 3960 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |