x
This commit is contained in:
@@ -20,7 +20,12 @@ typedef lFunction::iterator ilFunction;
|
||||
|
||||
|
||||
/* SYMBOL TABLE */
|
||||
struct SYM {
|
||||
struct SYM
|
||||
{
|
||||
SYM() : label(0),size(0),flg(0),type(TYPE_UNKNOWN)
|
||||
{
|
||||
|
||||
}
|
||||
char name[10]; /* New name for this variable */
|
||||
dword label; /* physical address (20 bit) */
|
||||
Int size; /* maximum size */
|
||||
@@ -29,13 +34,7 @@ struct SYM {
|
||||
eDuVal duVal; /* DEF, USE, VAL */
|
||||
};
|
||||
|
||||
struct SYMTAB
|
||||
{
|
||||
Int csym; /* No. of symbols in table */
|
||||
Int alloc; /* Allocation */
|
||||
SYM * sym; /* Symbols */
|
||||
};
|
||||
|
||||
typedef std::vector<SYM> SYMTAB;
|
||||
/* CALL GRAPH NODE */
|
||||
struct CALL_GRAPH
|
||||
{
|
||||
|
||||
@@ -332,7 +332,7 @@ struct DU1
|
||||
bool isLlFlag(dword flg) {return (ic.ll.flg&flg)==flg;}
|
||||
llIcode GetLlOpcode() const { return ic.ll.opcode; }
|
||||
|
||||
void writeIntComment(char *s);
|
||||
void writeIntComment(std::ostringstream &s);
|
||||
void setRegDU(byte regi, operDu du_in);
|
||||
void invalidate();
|
||||
void newCallHl();
|
||||
@@ -343,7 +343,7 @@ struct DU1
|
||||
void setUnary(hlIcode op, COND_EXPR *exp);
|
||||
void setJCond(COND_EXPR *cexp);
|
||||
void emitGotoLabel(Int indLevel);
|
||||
void copyDU(const ICODE &duIcode, operDu _du, operDu duDu);
|
||||
void copyDU(const ICODE &duIcode, operDu _du, operDu duDu);
|
||||
public:
|
||||
boolT removeDefRegi(byte regi, Int thisDefIdx, LOCAL_ID *locId);
|
||||
};
|
||||
|
||||
@@ -12,10 +12,6 @@ struct SYMTABLE
|
||||
std::string pSymName; /* Ptr to symbolic name or comment */
|
||||
dword symOff; /* Symbol image offset */
|
||||
Function *symProc; /* Procedure pointer */
|
||||
word preHash; /* Hash value before the modulo */
|
||||
word postHash; /* Hash value after the modulo */
|
||||
word nextOvf; /* Next entry this hash bucket, or -1 */
|
||||
word prevOvf; /* Back link in Ovf chain */
|
||||
SYMTABLE() : symOff(0),symProc(0) {}
|
||||
SYMTABLE(dword _sym,Function *_proc) : symOff(_sym),symProc(_proc)
|
||||
{}
|
||||
@@ -36,6 +32,6 @@ enum tableType /* The table types */
|
||||
|
||||
void createSymTables(void);
|
||||
void destroySymTables(void);
|
||||
boolT readVal (char *symName, dword symOff, Function *symProc);
|
||||
boolT readVal (std::ostringstream &symName, dword symOff, Function *symProc);
|
||||
void selectTable(tableType); /* Select a particular table */
|
||||
|
||||
|
||||
@@ -58,6 +58,10 @@ typedef unsigned char boolT; /* 8 bits */
|
||||
/* duVal FLAGS */
|
||||
struct eDuVal
|
||||
{
|
||||
eDuVal()
|
||||
{
|
||||
def=use=val=0;
|
||||
}
|
||||
enum flgs
|
||||
{
|
||||
DEF=1,
|
||||
|
||||
Reference in New Issue
Block a user