| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 Address RelocInfo::wasm_global_reference() { | 128 Address RelocInfo::wasm_global_reference() { |
| 129 DCHECK(IsWasmGlobalReference(rmode_)); | 129 DCHECK(IsWasmGlobalReference(rmode_)); |
| 130 return Memory::Address_at(pc_); | 130 return Memory::Address_at(pc_); |
| 131 } | 131 } |
| 132 | 132 |
| 133 uint32_t RelocInfo::wasm_memory_size_reference() { | 133 uint32_t RelocInfo::wasm_memory_size_reference() { |
| 134 DCHECK(IsWasmMemorySizeReference(rmode_)); | 134 DCHECK(IsWasmMemorySizeReference(rmode_)); |
| 135 return Memory::uint32_at(pc_); | 135 return Memory::uint32_at(pc_); |
| 136 } | 136 } |
| 137 | 137 |
| 138 uint32_t RelocInfo::wasm_function_table_size_reference() { |
| 139 DCHECK(IsWasmFunctionTableSizeReference(rmode_)); |
| 140 return Memory::uint32_at(pc_); |
| 141 } |
| 142 |
| 138 void RelocInfo::unchecked_update_wasm_memory_reference( | 143 void RelocInfo::unchecked_update_wasm_memory_reference( |
| 139 Address address, ICacheFlushMode flush_mode) { | 144 Address address, ICacheFlushMode flush_mode) { |
| 140 Memory::Address_at(pc_) = address; | 145 Memory::Address_at(pc_) = address; |
| 141 } | 146 } |
| 142 | 147 |
| 143 void RelocInfo::unchecked_update_wasm_memory_size(uint32_t size, | 148 void RelocInfo::unchecked_update_wasm_size(uint32_t size, |
| 144 ICacheFlushMode flush_mode) { | 149 ICacheFlushMode flush_mode) { |
| 145 Memory::uint32_at(pc_) = size; | 150 Memory::uint32_at(pc_) = size; |
| 146 } | 151 } |
| 147 | 152 |
| 148 // ----------------------------------------------------------------------------- | 153 // ----------------------------------------------------------------------------- |
| 149 // Implementation of Operand | 154 // Implementation of Operand |
| 150 | 155 |
| 151 Operand::Operand(Register base, int32_t disp) : rex_(0) { | 156 Operand::Operand(Register base, int32_t disp) : rex_(0) { |
| 152 len_ = 1; | 157 len_ = 1; |
| 153 if (base.is(rsp) || base.is(r12)) { | 158 if (base.is(rsp) || base.is(r12)) { |
| 154 // SIB byte is needed to encode (rsp + offset) or (r12 + offset). | 159 // SIB byte is needed to encode (rsp + offset) or (r12 + offset). |
| (...skipping 4602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4757 | 4762 |
| 4758 bool RelocInfo::IsInConstantPool() { | 4763 bool RelocInfo::IsInConstantPool() { |
| 4759 return false; | 4764 return false; |
| 4760 } | 4765 } |
| 4761 | 4766 |
| 4762 | 4767 |
| 4763 } // namespace internal | 4768 } // namespace internal |
| 4764 } // namespace v8 | 4769 } // namespace v8 |
| 4765 | 4770 |
| 4766 #endif // V8_TARGET_ARCH_X64 | 4771 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |