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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { | 359 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { |
360 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 360 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
361 if (rmode_ == EMBEDDED_OBJECT) { | 361 if (rmode_ == EMBEDDED_OBJECT) { |
362 return Memory::Object_Handle_at(pc_); | 362 return Memory::Object_Handle_at(pc_); |
363 } else { | 363 } else { |
364 return origin->code_target_object_handle_at(pc_); | 364 return origin->code_target_object_handle_at(pc_); |
365 } | 365 } |
366 } | 366 } |
367 | 367 |
368 | 368 |
369 Address RelocInfo::target_reference() { | 369 Address RelocInfo::target_external_reference() { |
370 DCHECK(rmode_ == RelocInfo::EXTERNAL_REFERENCE); | 370 DCHECK(rmode_ == RelocInfo::EXTERNAL_REFERENCE); |
371 return Memory::Address_at(pc_); | 371 return Memory::Address_at(pc_); |
372 } | 372 } |
373 | 373 |
374 | 374 |
| 375 Address RelocInfo::target_internal_reference() { |
| 376 DCHECK(rmode_ == INTERNAL_REFERENCE); |
| 377 return Memory::Address_at(pc_); |
| 378 } |
| 379 |
| 380 |
| 381 void RelocInfo::set_target_internal_reference(Address target) { |
| 382 DCHECK(rmode_ == INTERNAL_REFERENCE); |
| 383 Memory::Address_at(pc_) = target; |
| 384 } |
| 385 |
| 386 |
375 void RelocInfo::set_target_object(Object* target, | 387 void RelocInfo::set_target_object(Object* target, |
376 WriteBarrierMode write_barrier_mode, | 388 WriteBarrierMode write_barrier_mode, |
377 ICacheFlushMode icache_flush_mode) { | 389 ICacheFlushMode icache_flush_mode) { |
378 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 390 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
379 Memory::Object_at(pc_) = target; | 391 Memory::Object_at(pc_) = target; |
380 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 392 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
381 CpuFeatures::FlushICache(pc_, sizeof(Address)); | 393 CpuFeatures::FlushICache(pc_, sizeof(Address)); |
382 } | 394 } |
383 if (write_barrier_mode == UPDATE_WRITE_BARRIER && | 395 if (write_barrier_mode == UPDATE_WRITE_BARRIER && |
384 host() != NULL && | 396 host() != NULL && |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 | 635 |
624 void Operand::set_disp64(int64_t disp) { | 636 void Operand::set_disp64(int64_t disp) { |
625 DCHECK_EQ(1, len_); | 637 DCHECK_EQ(1, len_); |
626 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); | 638 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); |
627 *p = disp; | 639 *p = disp; |
628 len_ += sizeof(disp); | 640 len_ += sizeof(disp); |
629 } | 641 } |
630 } } // namespace v8::internal | 642 } } // namespace v8::internal |
631 | 643 |
632 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 644 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |