X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCicode.h;h=1822f79ff548c01c5ae1a28ce6e32fe86d094b88;hb=f3946e669d77d841b638d798c3e09429cd3338c6;hp=13f97ad57dbda584a74c2768a3aa514bf7b3b4ab;hpb=a77899caba78f1dd210c84a175ff372cf552567d;p=fw%2Fsdcc diff --git a/src/SDCCicode.h b/src/SDCCicode.h index 13f97ad5..1822f79f 100644 --- a/src/SDCCicode.h +++ b/src/SDCCicode.h @@ -119,8 +119,7 @@ extern operand *validateOpType(operand *op, #define IC_COND(x) (x)->ulrrcnd.cnd.condition #define IC_TRUE(x) (x)->ulrrcnd.cnd.trueLabel #define IC_FALSE(x) (x)->ulrrcnd.cnd.falseLabel -#define IC_LABEL(x) (x)->argLabel.label -// jwk #define IC_ARGS(x) (x)->argLabel.args +#define IC_LABEL(x) (x)->label #define IC_JTCOND(x) (x)->ulrrcnd.jmpTab.condition #define IC_JTLABELS(x) (x)->ulrrcnd.jmpTab.labels #define IC_INLINE(x) (x)->inlineAsm @@ -131,6 +130,7 @@ typedef struct iCode unsigned int op; /* operation defined */ int key; /* running key for this iCode */ int seq; /* sequence number within routine */ + int seqPoint; /* sequence point */ short depth; /* loop depth of this iCode */ short level; /* scope level */ short block; /* sequential block number */ @@ -178,12 +178,7 @@ typedef struct iCode } ulrrcnd; - union - { - symbol *label; /* for a goto statement */ - // jwk value *args; /* for a function */ - } - argLabel; + symbol *label; /* for a goto statement */ char *inlineAsm; /* pointer to inline assembler code */ literalList *arrayInitList; /* point to array initializer list. */ @@ -195,6 +190,7 @@ typedef struct iCode on stack */ int argreg; /* argument regno for SEND/RECEIVE */ int eBBlockNum; /* belongs to which eBBlock */ + char riu; /* after ralloc, the registers in use */ } iCode; @@ -284,15 +280,8 @@ iCodeTable; #define SET_RESULT_RIGHT(ic) {SET_ISADDR(IC_RIGHT(ic),0); SET_ISADDR(IC_RESULT(ic),0);} #define IS_ASSIGN_ICODE(ic) (ASSIGNMENT(ic) && !POINTER_SET(ic)) -#if 0 // this causes too much, extremely difficult to find, bugs - #define OP_DEFS(op) op->operand.symOperand->defs - #define OP_USES(op) op->operand.symOperand->uses -#else - struct bitVect *OP_DEFS(struct operand *); - struct bitVect *OP_DEFS_SET(struct operand *, struct bitVect *); - struct bitVect *OP_USES(struct operand *); - struct bitVect *OP_USES_SET(struct operand *, struct bitVect *); -#endif +#define OP_DEFS(op) validateOpType(op, "OP_DEFS", #op, SYMBOL, __FILE__, __LINE__)->operand.symOperand->defs +#define OP_USES(op) validateOpType(op, "OP_USES", #op, SYMBOL, __FILE__, __LINE__)->operand.symOperand->uses /*-----------------------------------------------------------------*/ /* forward references for functions */ /*-----------------------------------------------------------------*/ @@ -302,7 +291,6 @@ int isOperandVolatile (operand *, bool); int isOperandGlobal (operand *); void printiCChain (iCode *, FILE *); operand *ast2iCode (ast *,int); -operand *geniCodeCast (sym_link *, operand *, bool); operand *geniCodePtrPtrSubtract (operand *, operand *); void initiCode (); iCode *iCodeFromAst (ast *); @@ -323,6 +311,7 @@ iCode *newiCode (int, operand *, operand *); sym_link *operandType (operand *); operand *operandFromValue (value *); operand *operandFromSymbol (symbol *); +operand *operandFromLink (sym_link *); sym_link *aggrToPtr (sym_link *, bool); int piCode (void *, FILE *); int printOperand (operand *, FILE *);