Add iInvalid enum value for invalid instructions
Various cleanups.
This commit is contained in:
@@ -99,7 +99,7 @@ enum icodeType
|
||||
/* LOW_LEVEL icode opcodes */
|
||||
enum llIcode
|
||||
{
|
||||
//iINVALID,
|
||||
iINVALID=-1,
|
||||
iCBW, /* 0 */
|
||||
iAAA,
|
||||
iAAD,
|
||||
|
||||
@@ -313,7 +313,7 @@ struct LLOperand
|
||||
struct LLInst
|
||||
{
|
||||
protected:
|
||||
uint32_t m_opcode; // Low level opcode identifier
|
||||
llIcode m_opcode; // Low level opcode identifier
|
||||
uint32_t flg; /* icode flags */
|
||||
LLOperand m_src; /* source operand */
|
||||
public:
|
||||
@@ -326,8 +326,8 @@ public:
|
||||
std::vector<uint32_t> caseTbl2;
|
||||
int hllLabNum; /* label # for hll codegen */
|
||||
|
||||
uint32_t getOpcode() const { return m_opcode;}
|
||||
void setOpcode(uint32_t op) { m_opcode=op; }
|
||||
llIcode getOpcode() const { return m_opcode;}
|
||||
void setOpcode(uint32_t op) { m_opcode=(llIcode)op; }
|
||||
bool conditionalJump()
|
||||
{
|
||||
return (getOpcode() >= iJB) and (getOpcode() < iJCXZ);
|
||||
|
||||
@@ -28,7 +28,7 @@ struct LLInst;
|
||||
typedef std::list<ICODE>::iterator iICODE;
|
||||
struct IDX_ARRAY : public std::vector<iICODE>
|
||||
{
|
||||
bool inList(iICODE idx)
|
||||
bool inList(iICODE idx) const
|
||||
{
|
||||
return std::find(begin(),end(),idx)!=end();
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
ilFunction createFunction(FunctionType *f, const QString & name);
|
||||
bool valid(ilFunction iter);
|
||||
|
||||
int getSymIdxByAdd(uint32_t adr);
|
||||
int getSymIdxByAddr(uint32_t adr);
|
||||
bool validSymIdx(size_t idx);
|
||||
size_t symbolSize(size_t idx);
|
||||
hlType symbolType(size_t idx);
|
||||
|
||||
Reference in New Issue
Block a user