6#ifndef RUNTIME_VM_INSTRUCTIONS_IA32_H_
7#define RUNTIME_VM_INSTRUCTIONS_IA32_H_
9#ifndef RUNTIME_VM_INSTRUCTIONS_H_
10#error Do not include instructions_ia32.h directly; use instructions.h instead.
21class InstructionPattern :
public ValueObject {
30 return TestBytesWith(P::pattern(), P::pattern_length_in_bytes());
40 bool TestBytesWith(
const int*
data,
int num_bytes)
const {
42 const uint8_t* byte_array =
reinterpret_cast<const uint8_t*
>(start_);
43 for (
int i = 0;
i < num_bytes;
i++) {
45 if ((
data[
i] >= 0) && (byte_array[
i] != (0xFF &
data[
i]))) {
57class CallPattern :
public InstructionPattern<CallPattern> {
75 static const int kCallPattern[kLengthInBytes] = {0xE8, -1, -1, -1, -1};
80 static constexpr int kLengthInBytes = 5;
84class ReturnPattern :
public InstructionPattern<ReturnPattern> {
90 return kReturnPattern;
105 static const int kProloguePattern[kLengthInBytes] = {0x55, 0x89, 0xe5};
106 return kProloguePattern;
112 static constexpr int kLengthInBytes = 3;
122 static const int kFramePointerPattern[kLengthInBytes] = {0x89, 0xe5};
123 return kFramePointerPattern;
129 static constexpr int kLengthInBytes = 2;
static void FlushICache(uword start, uword size)
void SetTargetAddress(uword new_target) const
static int pattern_length_in_bytes()
static const int * pattern()
uword TargetAddress() const
InstructionPattern(uword pc)
static const int * pattern()
ProloguePattern(uword pc)
static int pattern_length_in_bytes()
static constexpr int kLengthInBytes
static const int * pattern()
static int pattern_length_in_bytes()
static const int * pattern()
SetFramePointerPattern(uword pc)
static int pattern_length_in_bytes()
constexpr intptr_t kWordSize
static int8_t data[kExtLength]