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 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ | 5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ |
6 #define V8_X64_ASSEMBLER_X64_INL_H_ | 6 #define V8_X64_ASSEMBLER_X64_INL_H_ |
7 | 7 |
8 #include "src/x64/assembler-x64.h" | 8 #include "src/x64/assembler-x64.h" |
9 | 9 |
10 #include "src/base/cpu.h" | 10 #include "src/base/cpu.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 Address target, | 259 Address target, |
260 ICacheFlushMode icache_flush_mode) { | 260 ICacheFlushMode icache_flush_mode) { |
261 Memory::int32_at(pc) = static_cast<int32_t>(target - pc - 4); | 261 Memory::int32_at(pc) = static_cast<int32_t>(target - pc - 4); |
262 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 262 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
263 CpuFeatures::FlushICache(pc, sizeof(int32_t)); | 263 CpuFeatures::FlushICache(pc, sizeof(int32_t)); |
264 } | 264 } |
265 } | 265 } |
266 | 266 |
267 | 267 |
268 void Assembler::deserialization_set_target_internal_reference_at( | 268 void Assembler::deserialization_set_target_internal_reference_at( |
269 Address pc, Address target) { | 269 Address pc, Address target, RelocInfo::Mode mode) { |
270 Memory::Address_at(pc) = target; | 270 Memory::Address_at(pc) = target; |
271 } | 271 } |
272 | 272 |
273 | 273 |
274 Address Assembler::target_address_from_return_address(Address pc) { | 274 Address Assembler::target_address_from_return_address(Address pc) { |
275 return pc - kCallTargetAddressOffset; | 275 return pc - kCallTargetAddressOffset; |
276 } | 276 } |
277 | 277 |
278 | 278 |
279 Address Assembler::break_address_from_return_address(Address pc) { | 279 Address Assembler::break_address_from_return_address(Address pc) { |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 | 644 |
645 void Operand::set_disp64(int64_t disp) { | 645 void Operand::set_disp64(int64_t disp) { |
646 DCHECK_EQ(1, len_); | 646 DCHECK_EQ(1, len_); |
647 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); | 647 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); |
648 *p = disp; | 648 *p = disp; |
649 len_ += sizeof(disp); | 649 len_ += sizeof(disp); |
650 } | 650 } |
651 } } // namespace v8::internal | 651 } } // namespace v8::internal |
652 | 652 |
653 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 653 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |