#include <assembler_base.h>
Definition at line 431 of file assembler_base.h.
◆ AssemblerBuffer()
dart::compiler::AssemblerBuffer::AssemblerBuffer |
( |
| ) |
|
Definition at line 468 of file assembler_base.cc.
469 : pointer_offsets_(new ZoneGrowableArray<intptr_t>(16)) {
470 const intptr_t kInitialBufferCapacity = 4 *
KB;
472 cursor_ = contents_;
473 limit_ = ComputeLimit(contents_, kInitialBufferCapacity);
474 fixup_ = nullptr;
475#if defined(DEBUG)
476 has_ensured_capacity_ = false;
477 fixups_processed_ = false;
478#endif
479
480
481 ASSERT(Capacity() == kInitialBufferCapacity);
483}
static uword NewContents(intptr_t capacity)
◆ ~AssemblerBuffer()
dart::compiler::AssemblerBuffer::~AssemblerBuffer |
( |
| ) |
|
◆ Address()
uword dart::compiler::AssemblerBuffer::Address |
( |
intptr_t |
position | ) |
|
|
inline |
◆ contents()
uword dart::compiler::AssemblerBuffer::contents |
( |
| ) |
const |
|
inline |
◆ CountPointerOffsets()
intptr_t dart::compiler::AssemblerBuffer::CountPointerOffsets |
( |
| ) |
const |
Definition at line 555 of file assembler_base.cc.
555 {
558 while (current != nullptr) {
559 if (current->IsPointerOffset()) ++
count;
560 current = current->previous_;
561 }
563}
friend class AssemblerFixup
◆ Emit()
void dart::compiler::AssemblerBuffer::Emit |
( |
T |
value | ) |
|
|
inline |
Definition at line 438 of file assembler_base.h.
438 {
440#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \
441 defined(TARGET_ARCH_RISCV32) || defined(TARGET_ARCH_RISCV64)
442
443
445#else
446
447 *
reinterpret_cast<T*
>(cursor_) =
value;
448#endif
449 cursor_ +=
sizeof(
T);
450 }
bool HasEnsuredCapacity() const
static void StoreUnaligned(T *ptr, T value)
◆ EmitFixup()
void dart::compiler::AssemblerBuffer::EmitFixup |
( |
AssemblerFixup * |
fixup | ) |
|
|
inline |
Definition at line 504 of file assembler_base.h.
504 {
505 fixup->set_previous(fixup_);
506 fixup->set_position(
Size());
507 fixup_ = fixup;
508 }
◆ FinalizeInstructions()
void dart::compiler::AssemblerBuffer::FinalizeInstructions |
( |
const MemoryRegion & |
region | ) |
|
Definition at line 495 of file assembler_base.cc.
495 {
496
497 MemoryRegion from(
reinterpret_cast<void*
>(
contents()),
Size());
498 instructions.CopyFrom(0, from);
499
500
501 ProcessFixups(instructions);
502#if defined(DEBUG)
503 fixups_processed_ = true;
504#endif
505}
◆ GetPosition()
intptr_t dart::compiler::AssemblerBuffer::GetPosition |
( |
| ) |
const |
|
inline |
◆ HasEnsuredCapacity()
bool dart::compiler::AssemblerBuffer::HasEnsuredCapacity |
( |
| ) |
const |
|
inline |
◆ Load()
T dart::compiler::AssemblerBuffer::Load |
( |
intptr_t |
position | ) |
|
|
inline |
Definition at line 462 of file assembler_base.h.
462 {
464 position <= (
Size() -
static_cast<intptr_t
>(
sizeof(
T))));
465#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \
466 defined(TARGET_ARCH_RISCV32) || defined(TARGET_ARCH_RISCV64)
467
468
470#else
471
472 return *
reinterpret_cast<T*
>(contents_ + position);
473#endif
474 }
static T LoadUnaligned(const T *ptr)
◆ pointer_offsets()
const ZoneGrowableArray< intptr_t > & dart::compiler::AssemblerBuffer::pointer_offsets |
( |
| ) |
const |
|
inline |
Definition at line 491 of file assembler_base.h.
491 {
492#if defined(DEBUG)
493 ASSERT(fixups_processed_);
494#endif
495 return *pointer_offsets_;
496 }
◆ Remit()
void dart::compiler::AssemblerBuffer::Remit |
( |
| ) |
|
|
inline |
◆ Reset()
void dart::compiler::AssemblerBuffer::Reset |
( |
| ) |
|
|
inline |
◆ Size()
intptr_t dart::compiler::AssemblerBuffer::Size |
( |
| ) |
const |
|
inline |
◆ Store()
void dart::compiler::AssemblerBuffer::Store |
( |
intptr_t |
position, |
|
|
T |
value |
|
) |
| |
|
inline |
Definition at line 477 of file assembler_base.h.
477 {
479 position <= (
Size() -
static_cast<intptr_t
>(
sizeof(
T))));
480#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \
481 defined(TARGET_ARCH_RISCV32) || defined(TARGET_ARCH_RISCV64)
482
483
485#else
486
487 *
reinterpret_cast<T*
>(contents_ + position) =
value;
488#endif
489 }
◆ AssemblerFixup
The documentation for this class was generated from the following files: