projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug #532436
[fw/sdcc]
/
src
/
SDCCicode.h
diff --git
a/src/SDCCicode.h
b/src/SDCCicode.h
index 4156e257fde85a3adda835b4d907d6f981c084e5..f171bca1f5db40b9c4acdd892defb42e9762f51d 100644
(file)
--- a/
src/SDCCicode.h
+++ b/
src/SDCCicode.h
@@
-50,6
+50,8
@@
OPTYPE;
#define IS_SYMOP(op) (op && op->type == SYMBOL)
#define IS_VALOP(op) (op && op->type == VALUE)
#define IS_SYMOP(op) (op && op->type == SYMBOL)
#define IS_VALOP(op) (op && op->type == VALUE)
+#define IS_TYPOP(op) (op && op->type == TYPE)
+
#define ADDTOCHAIN(x) addSetHead(&iCodeChain,x)
#define LRFTYPE sym_link *ltype = operandType(left), \
#define ADDTOCHAIN(x) addSetHead(&iCodeChain,x)
#define LRFTYPE sym_link *ltype = operandType(left), \
@@
-74,6
+76,7
@@
OPTYPE;
#define OP_LIVETO(op) op->operand.symOperand->liveTo
#define OP_REQV(op) op->operand.symOperand->reqv
#define OP_ISLIVE_FCALL(op) (IS_ITEMP(op) && OP_SYMBOL(op)->isLiveFcall)
#define OP_LIVETO(op) op->operand.symOperand->liveTo
#define OP_REQV(op) op->operand.symOperand->reqv
#define OP_ISLIVE_FCALL(op) (IS_ITEMP(op) && OP_SYMBOL(op)->isLiveFcall)
+#define SYM_SPIL_LOC(sym) sym->usl.spillLoc
/* typedef for operand */
typedef struct operand
/* typedef for operand */
typedef struct operand
@@
-109,7
+112,7
@@
operand;
#define IC_TRUE(x) (x)->ulrrcnd.cnd.trueLabel
#define IC_FALSE(x) (x)->ulrrcnd.cnd.falseLabel
#define IC_LABEL(x) (x)->argLabel.label
#define IC_TRUE(x) (x)->ulrrcnd.cnd.trueLabel
#define IC_FALSE(x) (x)->ulrrcnd.cnd.falseLabel
#define IC_LABEL(x) (x)->argLabel.label
-#define IC_ARGS(x) (x)->argLabel.args
+
// jwk
#define IC_ARGS(x) (x)->argLabel.args
#define IC_JTCOND(x) (x)->ulrrcnd.jmpTab.condition
#define IC_JTLABELS(x) (x)->ulrrcnd.jmpTab.labels
#define IC_INLINE(x) (x)->inlineAsm
#define IC_JTCOND(x) (x)->ulrrcnd.jmpTab.condition
#define IC_JTLABELS(x) (x)->ulrrcnd.jmpTab.labels
#define IC_INLINE(x) (x)->inlineAsm
@@
-129,6
+132,7
@@
typedef struct iCode
unsigned supportRtn:1; /* will cause a call to a support routine */
unsigned regsSaved:1; /* registers have been saved */
unsigned bankSaved:1; /* register bank has been saved */
unsigned supportRtn:1; /* will cause a call to a support routine */
unsigned regsSaved:1; /* registers have been saved */
unsigned bankSaved:1; /* register bank has been saved */
+ unsigned builtinSEND:1; /* SEND for parameter of builtin function */
struct iCode *next; /* next in chain */
struct iCode *prev; /* previous in chain */
struct iCode *next; /* next in chain */
struct iCode *prev; /* previous in chain */
@@
-169,7
+173,7
@@
typedef struct iCode
union
{
symbol *label; /* for a goto statement */
union
{
symbol *label; /* for a goto statement */
- value *args;
+ // jwk value *args; /* for a function */
}
argLabel;
}
argLabel;
@@
-181,6
+185,8
@@
typedef struct iCode
int parmBytes; /* if call/pcall, count of parameter bytes
on stack */
int parmBytes; /* if call/pcall, count of parameter bytes
on stack */
+ int argreg; /* argument regno for SEND/RECEIVE */
+ int eBBlockNum; /* belongs to which eBBlock */
}
iCode;
}
iCode;
@@
-213,6
+219,9
@@
iCodeTable;
SKIP_IC1(x)|| \
x->op == SEND )
SKIP_IC1(x)|| \
x->op == SEND )
+#define SKIP_IC3(x) (SKIP_IC2(x) || \
+ x->op == JUMPTABLE )
+
#define IS_CONDITIONAL(x) (x->op == EQ_OP || \
x->op == '<' || \
x->op == '>' || \
#define IS_CONDITIONAL(x) (x->op == EQ_OP || \
x->op == '<' || \
x->op == '>' || \
@@
-262,8
+271,10
@@
iCodeTable;
#define ASSIGNMENT_TO_SELF(ic) (!POINTER_SET(ic) && !POINTER_GET(ic) && \
ic->op == '=' && IC_RESULT(ic)->key == IC_RIGHT(ic)->key )
#define ASSIGNMENT_TO_SELF(ic) (!POINTER_SET(ic) && !POINTER_GET(ic) && \
ic->op == '=' && IC_RESULT(ic)->key == IC_RIGHT(ic)->key )
+#define IS_CAST_ICODE(ic) (ic && ic->op == CAST)
#define SET_ISADDR(op,v) {op = operandFromOperand(op); op->isaddr = v;}
#define SET_RESULT_RIGHT(ic) {SET_ISADDR(IC_RIGHT(ic),0); SET_ISADDR(IC_RESULT(ic),0);}
#define SET_ISADDR(op,v) {op = operandFromOperand(op); op->isaddr = v;}
#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))
#define OP_DEFS(op) op->operand.symOperand->defs
#define OP_USES(op) op->operand.symOperand->uses
#define OP_DEFS(op) op->operand.symOperand->defs
#define OP_USES(op) op->operand.symOperand->uses
@@
-302,9
+313,12
@@
int piCode (void *, FILE *);
int printOperand (operand *, FILE *);
void setOperandType (operand *, sym_link *);
bool isOperandInFarSpace (operand *);
int printOperand (operand *, FILE *);
void setOperandType (operand *, sym_link *);
bool isOperandInFarSpace (operand *);
+bool isOperandInDirSpace (operand *);
+bool isOperandInCodeSpace (operand *);
operand *opFromOpWithDU (operand *, bitVect *, bitVect *);
iCode *copyiCode (iCode *);
operand *newiTempFromOp (operand *);
operand *opFromOpWithDU (operand *, bitVect *, bitVect *);
iCode *copyiCode (iCode *);
operand *newiTempFromOp (operand *);
+iCode *getBuiltinParms (iCode *,int *, operand **);
/*-----------------------------------------------------------------*/
/* declaration of exported variables */
/*-----------------------------------------------------------------*/
/*-----------------------------------------------------------------*/
/* declaration of exported variables */
/*-----------------------------------------------------------------*/