Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Attributes | List of all members
dart::PcRelativeTrampolineJumpPattern Class Reference

#include <instructions_arm.h>

Inheritance diagram for dart::PcRelativeTrampolineJumpPattern:
dart::ValueObject dart::ValueObject dart::ValueObject dart::PcRelativeTailCallPattern

Public Member Functions

 PcRelativeTrampolineJumpPattern (uword pattern_start)
 
void Initialize ()
 
int32_t distance ()
 
void set_distance (int32_t distance)
 
bool IsValid () const
 
 PcRelativeTrampolineJumpPattern (uword pattern_start)
 
void Initialize ()
 
int32_t distance ()
 
void set_distance (int32_t distance)
 
bool IsValid () const
 
 PcRelativeTrampolineJumpPattern (uword pc)
 
void Initialize ()
 
 PcRelativeTrampolineJumpPattern (uword pattern_start)
 
void Initialize ()
 
int32_t distance ()
 
void set_distance (intptr_t distance)
 
bool IsValid () const
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Static Public Attributes

static constexpr int kLengthInBytes = 3 * Instr::kInstrSize
 

Detailed Description

Definition at line 247 of file instructions_arm.h.

Constructor & Destructor Documentation

◆ PcRelativeTrampolineJumpPattern() [1/4]

dart::PcRelativeTrampolineJumpPattern::PcRelativeTrampolineJumpPattern ( uword  pattern_start)
inlineexplicit

Definition at line 249 of file instructions_arm.h.

250 : pattern_start_(pattern_start) {
251 USE(pattern_start_);
252 }
static void USE(T &&)
Definition: globals.h:618

◆ PcRelativeTrampolineJumpPattern() [2/4]

dart::PcRelativeTrampolineJumpPattern::PcRelativeTrampolineJumpPattern ( uword  pattern_start)
inlineexplicit

Definition at line 259 of file instructions_arm64.h.

260 : pattern_start_(pattern_start) {
261 USE(pattern_start_);
262 }

◆ PcRelativeTrampolineJumpPattern() [3/4]

dart::PcRelativeTrampolineJumpPattern::PcRelativeTrampolineJumpPattern ( uword  pc)
inlineexplicit

Definition at line 240 of file instructions_riscv.h.

241 : PcRelativeTailCallPattern(pc) {}

◆ PcRelativeTrampolineJumpPattern() [4/4]

dart::PcRelativeTrampolineJumpPattern::PcRelativeTrampolineJumpPattern ( uword  pattern_start)
inlineexplicit

Definition at line 167 of file instructions_x64.h.

168 : pattern_start_(pattern_start) {}

Member Function Documentation

◆ distance() [1/3]

int32_t dart::PcRelativeTrampolineJumpPattern::distance ( )

◆ distance() [2/3]

int32_t dart::PcRelativeTrampolineJumpPattern::distance ( )

◆ distance() [3/3]

int32_t dart::PcRelativeTrampolineJumpPattern::distance ( )
inline

Definition at line 175 of file instructions_x64.h.

175 {
176 return LoadUnaligned(reinterpret_cast<int32_t*>(pattern_start_ + 1)) +
178 }
static T LoadUnaligned(const T *ptr)
Definition: unaligned.h:14

◆ Initialize() [1/4]

void dart::PcRelativeTrampolineJumpPattern::Initialize ( )

◆ Initialize() [2/4]

void dart::PcRelativeTrampolineJumpPattern::Initialize ( )

◆ Initialize() [3/4]

void dart::PcRelativeTrampolineJumpPattern::Initialize ( )

◆ Initialize() [4/4]

void dart::PcRelativeTrampolineJumpPattern::Initialize ( )
inline

Definition at line 170 of file instructions_x64.h.

170 {
171 uint8_t* pattern = reinterpret_cast<uint8_t*>(pattern_start_);
172 pattern[0] = 0xe9;
173 }

◆ IsValid() [1/3]

bool dart::PcRelativeTrampolineJumpPattern::IsValid ( ) const

◆ IsValid() [2/3]

bool dart::PcRelativeTrampolineJumpPattern::IsValid ( ) const

◆ IsValid() [3/3]

bool dart::PcRelativeTrampolineJumpPattern::IsValid ( ) const
inline

Definition at line 187 of file instructions_x64.h.

187 {
188 uint8_t* pattern = reinterpret_cast<uint8_t*>(pattern_start_);
189 return pattern[0] == 0xe9;
190 }

◆ set_distance() [1/3]

void dart::PcRelativeTrampolineJumpPattern::set_distance ( int32_t  distance)

◆ set_distance() [2/3]

void dart::PcRelativeTrampolineJumpPattern::set_distance ( int32_t  distance)

◆ set_distance() [3/3]

void dart::PcRelativeTrampolineJumpPattern::set_distance ( intptr_t  distance)
inline

Definition at line 180 of file instructions_x64.h.

180 {
181 // [distance] is relative to the start of the instruction, x64 considers the
182 // offset relative to next PC.
183 StoreUnaligned(reinterpret_cast<int32_t*>(pattern_start_ + 1),
184 static_cast<int32_t>(distance - kLengthInBytes));
185 }
static void StoreUnaligned(T *ptr, T value)
Definition: unaligned.h:22

Member Data Documentation

◆ kLengthInBytes

static constexpr int dart::PcRelativeTrampolineJumpPattern::kLengthInBytes = 3 * Instr::kInstrSize
staticconstexpr

Definition at line 254 of file instructions_arm.h.


The documentation for this class was generated from the following files: