fixed bug#680076
[fw/sdcc] / src / SDCCicode.h
index bd467419e492003d2ff04724826f554e2ad7b856..1c77db9203ad08604dcdeea4fd3773771b818cca 100644 (file)
@@ -50,6 +50,8 @@ OPTYPE;
 
 #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), \
@@ -183,6 +185,7 @@ typedef struct iCode
     
     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;
@@ -273,8 +276,15 @@ 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))
 
-#define OP_DEFS(op) op->operand.symOperand->defs
-#define OP_USES(op) op->operand.symOperand->uses
+#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
 /*-----------------------------------------------------------------*/
 /* forward references for functions                                */
 /*-----------------------------------------------------------------*/
@@ -310,6 +320,8 @@ int piCode (void *, FILE *);
 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 *);