Implementaion of builtin functions
[fw/sdcc] / src / SDCCicode.h
index ab8d0536dbad6970473906a5856e876df969c497..bd467419e492003d2ff04724826f554e2ad7b856 100644 (file)
@@ -74,6 +74,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 SYM_SPIL_LOC(sym)  sym->usl.spillLoc
 
 /* typedef for operand */
 typedef struct operand
@@ -129,6 +130,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 builtinSEND:1;     /* SEND for parameter of builtin function */
 
     struct iCode *next;                /* next in chain */
     struct iCode *prev;                /* previous in chain */
@@ -181,6 +183,7 @@ typedef struct iCode
     
     int parmBytes;             /* if call/pcall, count of parameter bytes 
                                   on stack */
+    int eBBlockNum;             /* belongs to which eBBlock */
   }
 iCode;
 
@@ -213,6 +216,9 @@ iCodeTable;
                      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 == '>'   || \
@@ -265,6 +271,7 @@ iCodeTable;
 #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 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
@@ -306,6 +313,7 @@ bool isOperandInFarSpace (operand *);
 operand *opFromOpWithDU (operand *, bitVect *, bitVect *);
 iCode *copyiCode (iCode *);
 operand *newiTempFromOp (operand *);
+iCode *getBuiltinParms (iCode *,int *, operand **);
 /*-----------------------------------------------------------------*/
 /* declaration of exported variables                               */
 /*-----------------------------------------------------------------*/