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 |
3886 void Assembler::dq(Label* label) { | 3892 void Assembler::dq(Label* label) { |
3887 EnsureSpace ensure_space(this); | 3893 EnsureSpace ensure_space(this); |
3888 if (label->is_bound()) { | 3894 if (label->is_bound()) { |
3889 internal_reference_positions_.push_back(pc_offset()); | 3895 internal_reference_positions_.push_back(pc_offset()); |
3890 emitp(buffer_ + label->pos(), RelocInfo::INTERNAL_REFERENCE); | 3896 emitp(buffer_ + label->pos(), RelocInfo::INTERNAL_REFERENCE); |
3891 } else { | 3897 } else { |
3892 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); | 3898 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); |
3893 emitl(0); // Zero for the first 32bit marks it as 64bit absolute address. | 3899 emitl(0); // Zero for the first 32bit marks it as 64bit absolute address. |
3894 if (label->is_linked()) { | 3900 if (label->is_linked()) { |
3895 emitl(label->pos()); | 3901 emitl(label->pos()); |
(...skipping 18 matching lines...) Expand all Loading... |
3914 return; | 3920 return; |
3915 } else if (rmode == RelocInfo::CODE_AGE_SEQUENCE) { | 3921 } else if (rmode == RelocInfo::CODE_AGE_SEQUENCE) { |
3916 // Don't record psuedo relocation info for code age sequence mode. | 3922 // Don't record psuedo relocation info for code age sequence mode. |
3917 return; | 3923 return; |
3918 } | 3924 } |
3919 RelocInfo rinfo(pc_, rmode, data, NULL); | 3925 RelocInfo rinfo(pc_, rmode, data, NULL); |
3920 reloc_info_writer.Write(&rinfo); | 3926 reloc_info_writer.Write(&rinfo); |
3921 } | 3927 } |
3922 | 3928 |
3923 | 3929 |
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 | |
3938 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | | 3930 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | |
3939 1 << RelocInfo::RUNTIME_ENTRY | | 3931 1 << RelocInfo::RUNTIME_ENTRY | |
3940 1 << RelocInfo::INTERNAL_REFERENCE | | 3932 1 << RelocInfo::INTERNAL_REFERENCE | |
3941 1 << RelocInfo::CODE_AGE_SEQUENCE; | 3933 1 << RelocInfo::CODE_AGE_SEQUENCE; |
3942 | 3934 |
3943 | 3935 |
3944 bool RelocInfo::IsCodedSpecially() { | 3936 bool RelocInfo::IsCodedSpecially() { |
3945 // The deserializer needs to know whether a pointer is specially coded. Being | 3937 // The deserializer needs to know whether a pointer is specially coded. Being |
3946 // specially coded on x64 means that it is a relative 32 bit address, as used | 3938 // specially coded on x64 means that it is a relative 32 bit address, as used |
3947 // by branch instructions. | 3939 // by branch instructions. |
3948 return (1 << rmode_) & kApplyMask; | 3940 return (1 << rmode_) & kApplyMask; |
3949 } | 3941 } |
3950 | 3942 |
3951 | 3943 |
3952 bool RelocInfo::IsInConstantPool() { | 3944 bool RelocInfo::IsInConstantPool() { |
3953 return false; | 3945 return false; |
3954 } | 3946 } |
3955 | 3947 |
3956 | 3948 |
3957 } // namespace internal | 3949 } // namespace internal |
3958 } // namespace v8 | 3950 } // namespace v8 |
3959 | 3951 |
3960 #endif // V8_TARGET_ARCH_X64 | 3952 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |