38#ifndef __ARCH_X86_INSTS_STATICINST_HH__
39#define __ARCH_X86_INSTS_STATICINST_HH__
47#include "debug/X86.hh"
106 static void printMem(std::ostream &
os, uint8_t segment,
108 uint64_t disp, uint8_t addressSize,
bool rip);
129 static void divideStep(uint64_t divident, uint64_t divisor,
130 uint64_t "ient, uint64_t &remainder);
132 static inline uint64_t
135 X86IntReg
reg = into;
156 panic(
"Tried to merge with unrecognized size %d.\n",
size);
161 static inline uint64_t
164 X86IntReg
reg = from;
178 panic(
"Tried to pick with unrecognized size %d.\n",
size);
182 static inline int64_t
185 X86IntReg
reg = from;
199 panic(
"Tried to pick with unrecognized size %d.\n",
size);
217 std::unique_ptr<PCStateBase>
223 return std::unique_ptr<PCStateBase>{ret_pc_ptr};
virtual PCStateBase * clone() const =0
Register ID: describe an architectural register with its class and index.
Base, ISA-independent static instruction class.
const char * mnemonic
Base mnemonic (e.g., "add").
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual const PCStateBase & pcState() const =0
Base class for all X86 static instructions.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::unique_ptr< PCStateBase > buildRetPC(const PCStateBase &cur_pc, const PCStateBase &call_pc) const override
static void printMem(std::ostream &os, uint8_t segment, uint8_t scale, RegIndex index, RegIndex base, uint64_t disp, uint8_t addressSize, bool rip)
static void printSegment(std::ostream &os, int segment)
static void printMnemonic(std::ostream &os, const char *mnemonic)
static void divideStep(uint64_t divident, uint64_t divisor, uint64_t "ient, uint64_t &remainder)
void advancePC(PCStateBase &pcState) const override
static void printReg(std::ostream &os, RegId reg, int size)
static uint64_t merge(uint64_t into, RegIndex index, uint64_t val, int size)
X86StaticInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
static int64_t signedPick(uint64_t from, RegIndex index, int size)
void advancePC(ThreadContext *tc) const override
static uint64_t pick(uint64_t from, RegIndex index, int size)
#define panic(...)
This implements a cprintf based panic() function.
constexpr RegIndex IntFoldBit
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
CtrlRegIndex(RegIndex idx)
DbgRegIndex(RegIndex idx)
Classes for register indices passed to instruction constructors.
SegRegIndex(RegIndex idx)