Rizin
unix-like reverse engineering framework and cli tools
|
#include "capstone/platform.h"
Go to the source code of this file.
Classes | |
struct | MCRegisterClass |
struct | MCRegisterDesc |
struct | MCRegisterInfo |
Typedefs | |
typedef uint16_t | MCPhysReg |
typedef const MCPhysReg * | iterator |
typedef struct MCRegisterClass | MCRegisterClass |
typedef struct MCRegisterDesc | MCRegisterDesc |
typedef struct MCRegisterInfo | MCRegisterInfo |
Functions | |
void | MCRegisterInfo_InitMCRegisterInfo (MCRegisterInfo *RI, const MCRegisterDesc *D, unsigned NR, unsigned RA, unsigned PC, const MCRegisterClass *C, unsigned NC, uint16_t(*RURoots)[2], unsigned NRU, const MCPhysReg *DL, const char *Strings, const uint16_t *SubIndices, unsigned NumIndices, const uint16_t *RET) |
unsigned | MCRegisterInfo_getMatchingSuperReg (const MCRegisterInfo *RI, unsigned Reg, unsigned SubIdx, const MCRegisterClass *RC) |
unsigned | MCRegisterInfo_getSubReg (const MCRegisterInfo *RI, unsigned Reg, unsigned Idx) |
const MCRegisterClass * | MCRegisterInfo_getRegClass (const MCRegisterInfo *RI, unsigned i) |
bool | MCRegisterClass_contains (const MCRegisterClass *c, unsigned Reg) |
Definition at line 27 of file MCRegisterInfo.h.
An unsigned integer type large enough to represent all physical registers, but not necessarily virtual registers.
Definition at line 26 of file MCRegisterInfo.h.
typedef struct MCRegisterClass MCRegisterClass |
typedef struct MCRegisterDesc MCRegisterDesc |
MCRegisterDesc - This record contains information about a particular register. The SubRegs field is a zero terminated array of registers that are sub-registers of the specific register, e.g. AL, AH are sub-registers of AX. The SuperRegs field is a zero terminated array of registers that are super-registers of the specific register, e.g. RAX, EAX, are super-registers of AX.
typedef struct MCRegisterInfo MCRegisterInfo |
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc objects that represent all of the machine registers that the target has. As such, we simply have to track a pointer to this array so that we can turn register number into a register descriptor.
Note this class is designed to be a base class of TargetRegisterInfo, which is the interface used by codegen. However, specific targets should never specialize this class. MCRegisterInfo should only contain getters to access TableGen generated physical register data. It must not be extended with virtual methods.
bool MCRegisterClass_contains | ( | const MCRegisterClass * | c, |
unsigned | Reg | ||
) |
Definition at line 134 of file MCRegisterInfo.c.
References c.
Referenced by MCRegisterInfo_getMatchingSuperReg().
unsigned MCRegisterInfo_getMatchingSuperReg | ( | const MCRegisterInfo * | RI, |
unsigned | Reg, | ||
unsigned | SubIdx, | ||
const MCRegisterClass * | RC | ||
) |
Definition at line 86 of file MCRegisterInfo.c.
References MCRegisterInfo::Desc, DiffListIterator_getVal(), DiffListIterator_init(), DiffListIterator_isValid(), DiffListIterator_next(), MCRegisterInfo::DiffLists, MCRegisterClass_contains(), MCRegisterInfo_getSubReg(), MCRegisterInfo::NumRegs, MCRegisterDesc::SuperRegs, and val.
const MCRegisterClass* MCRegisterInfo_getRegClass | ( | const MCRegisterInfo * | RI, |
unsigned | i | ||
) |
Definition at line 126 of file MCRegisterInfo.c.
References MCRegisterInfo::Classes, i, and MCRegisterInfo::NumClasses.
unsigned MCRegisterInfo_getSubReg | ( | const MCRegisterInfo * | RI, |
unsigned | Reg, | ||
unsigned | Idx | ||
) |
Definition at line 108 of file MCRegisterInfo.c.
References MCRegisterInfo::Desc, DiffListIterator_getVal(), DiffListIterator_init(), DiffListIterator_isValid(), DiffListIterator_next(), MCRegisterInfo::DiffLists, MCRegisterDesc::SubRegIndices, MCRegisterInfo::SubRegIndices, and MCRegisterDesc::SubRegs.
Referenced by MCRegisterInfo_getMatchingSuperReg().
void MCRegisterInfo_InitMCRegisterInfo | ( | MCRegisterInfo * | RI, |
const MCRegisterDesc * | D, | ||
unsigned | NR, | ||
unsigned | RA, | ||
unsigned | PC, | ||
const MCRegisterClass * | C, | ||
unsigned | NC, | ||
uint16_t(*) | RURoots[2], | ||
unsigned | NRU, | ||
const MCPhysReg * | DL, | ||
const char * | Strings, | ||
const uint16_t * | SubIndices, | ||
unsigned | NumIndices, | ||
const uint16_t * | RET | ||
) |
Definition at line 28 of file MCRegisterInfo.c.
References C, MCRegisterInfo::Classes, D, MCRegisterInfo::Desc, MCRegisterInfo::DiffLists, NC, MCRegisterInfo::NumClasses, MCRegisterInfo::NumRegs, MCRegisterInfo::NumRegUnits, MCRegisterInfo::NumSubRegIndices, PC, MCRegisterInfo::PCReg, MCRegisterInfo::RAReg, MCRegisterInfo::RegEncodingTable, MCRegisterInfo::RegStrings, MCRegisterInfo::RegUnitRoots, RET, and MCRegisterInfo::SubRegIndices.