some -xstack related stuff
[fw/sdcc] / src / SDCCicode.h
index e3be255f0177cb45a2739bad288b50d0219bde5e..b394c56d0db5694af82f9b034ba5c85f42684d7c 100644 (file)
@@ -37,10 +37,12 @@ enum {
         EXPRESSION      ,
         STATEMENT       ,
         LEAF            };
-enum optype {
+
+typedef enum {
   SYMBOL    =1,
   VALUE       ,
-  TYPE      };
+  TYPE      
+} OPTYPE;
 
 #define IS_SYMOP(op) (op && op->type == SYMBOL)
 #define ADDTOCHAIN(x) addSetHead(&iCodeChain,x)
@@ -65,10 +67,11 @@ enum optype {
 #define OP_LIVEFROM(op)    op->operand.symOperand->liveFrom
 #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)
 
 /* typedef for operand */
 typedef struct operand {
-    unsigned int  type: 6 ;      /* type of operand */
+    OPTYPE type;                /* type of operand */
     unsigned int  isaddr : 1;    /* is an address   */
     unsigned int  isvolatile: 1; /* is a volatile operand */
     unsigned int  isGlobal :1 ;  /* is a global operand */
@@ -77,7 +80,7 @@ typedef struct operand {
     unsigned int  isParm   :1 ;  /* is a parameter        */
     unsigned int  isLiteral:1 ;  /* operand is literal    */
     unsigned int  noSpilLoc:1 ;  /* cannot be assigned a spil location */
-    
+
     unsigned key ;
     int      parmBytes;
     union {
@@ -242,6 +245,7 @@ typedef struct icodeFuncTable
 /* forward references for functions                                */
 /*-----------------------------------------------------------------*/
 iCode   *reverseiCChain     (      );
+bool     isOperandOnStack   (operand *);
 int      isOperandVolatile  (operand *,bool);
 int      isOperandGlobal    (operand *);
 void     printiCChain    ( iCode * , FILE *);
@@ -275,4 +279,9 @@ bool     isOperandInFarSpace (operand *);
 operand *opFromOpWithDU (operand *,bitVect *,bitVect *);
 iCode   *copyiCode (iCode *);
 operand *newiTempFromOp( operand *);
+/*-----------------------------------------------------------------*/
+/* declaration of exported variables                               */
+/*-----------------------------------------------------------------*/
+extern char *filename;
+extern int lineno;
 #endif