40 #ifndef __ARCH_X86_INSTS_STATICINST_HH__ 41 #define __ARCH_X86_INSTS_STATICINST_HH__ 45 #include "debug/X86.hh" 91 std::string generateDisassembly(
Addr pc,
94 void printMnemonic(std::ostream &
os,
const char * mnemonic)
const;
95 void printMnemonic(std::ostream &os,
const char * instMnemonic,
96 const char * mnemonic)
const;
98 void printSegment(std::ostream &os,
int segment)
const;
100 void printReg(std::ostream &os,
RegId reg,
int size)
const;
101 void printSrcReg(std::ostream &os,
int reg,
int size)
const;
102 void printDestReg(std::ostream &os,
int reg,
int size)
const;
103 void printMem(std::ostream &os, uint8_t segment,
105 uint64_t disp, uint8_t addressSize,
bool rip)
const;
107 inline uint64_t
merge(uint64_t into, uint64_t
val,
int size)
const 109 X86IntReg reg = into;
132 panic(
"Tried to merge with unrecognized size %d.\n", size);
137 inline uint64_t
pick(uint64_t from,
int idx,
int size)
const 139 X86IntReg reg = from;
140 DPRINTF(X86,
"Picking with size %d\n", size);
154 panic(
"Tried to pick with unrecognized size %d.\n", size);
158 inline int64_t
signedPick(uint64_t from,
int idx,
int size)
const 160 X86IntReg reg = from;
161 DPRINTF(X86,
"Picking with size %d\n", size);
175 panic(
"Tried to pick with unrecognized size %d.\n", size);
187 #endif //__ARCH_X86_INSTS_STATICINST_HH__ #define panic(...)
This implements a cprintf based panic() function.
Class for register indices passed to instruction constructors.
int64_t signedPick(uint64_t from, int idx, int size) const
RegClass
Enumerate the classes of registers.
uint64_t merge(uint64_t into, uint64_t val, int size) const
void advancePC(PCState &pcState) const
X86StaticInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
RegClass computeRegClass(RegIndex _idx)
Base class for all X86 static instructions.
uint64_t pick(uint64_t from, int idx, int size) const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
static const IntRegIndex IntFoldBit
This is exposed globally, independent of the ISA.
InstRegIndex(RegIndex _idx)
Base, ISA-independent static instruction class.
const RegIndex & index() const
Index accessors.
TheISA::ExtMachInst ExtMachInst
Binary extended machine instruction type.
Register ID: describe an architectural register with its class and index.