* as/z80/z80mch.c: fixed bug #1704376: missing as-z80 errors
[fw/sdcc] / src / SDCCicode.h
index a05c67c478135e113070735bee2db4a6ca054a97..d2c69a1f10ef2537ff3b1138dfeb8f7918bffa02 100644 (file)
@@ -75,7 +75,8 @@ typedef struct operand
   {
     OPTYPE type;                /* type of operand */
     unsigned int isaddr:1;      /* is an address   */
-    unsigned int aggr2ptr:1;    /* must change aggregate to pointer to aggregate */
+    unsigned int aggr2ptr:2;    /* 1: must change aggregate to pointer to aggregate */
+                                /* 2: aggregate has been changed to pointer to aggregate */
     unsigned int isvolatile:1;  /* is a volatile operand */
     unsigned int isGlobal:1;    /* is a global operand */
     unsigned int isPtr:1;       /* is assigned a pointer */
@@ -104,8 +105,8 @@ extern operand *validateOpType(operand          *op,
                                const char       *file,
                                unsigned         line);
 
-#define OP_SYMBOL(op) validateOpType(op, "OP_SYMBOL", #op, SYMBOL, __FILE__, __LINE__)->operand.symOperand
-#define OP_VALUE(op)  validateOpType(op, "OP_VALUE", #op, VALUE, __FILE__, __LINE__)->operand.valOperand
+#define OP_SYMBOL(op)      validateOpType(op, "OP_SYMBOL", #op, SYMBOL, __FILE__, __LINE__)->operand.symOperand
+#define OP_VALUE(op)       validateOpType(op, "OP_VALUE", #op, VALUE, __FILE__, __LINE__)->operand.valOperand
 #define OP_SYM_TYPE(op)    validateOpType(op, "OP_SYM_TYPE", #op, SYMBOL, __FILE__, __LINE__)->operand.symOperand->type
 #define OP_SYM_ETYPE(op)   validateOpType(op, "OP_SYM_ETYPE", #op, SYMBOL, __FILE__, __LINE__)->operand.symOperand->etype
 #define SPIL_LOC(op)       validateOpType(op, "SPIL_LOC", #op, SYMBOL, __FILE__, __LINE__)->operand.symOperand->usl.spillLoc
@@ -240,12 +241,12 @@ iCodeTable;
 #define IS_TRUE_SYMOP(op) (op && IS_SYMOP(op) && !IS_ITEMP(op))
 
 #define POINTER_SET(ic) ( ic && ic->op == '='           \
-                             && IS_ITEMP(IC_RESULT(ic)) \
+                             && (IS_ITEMP(IC_RESULT(ic)) || IS_OP_LITERAL(IC_RESULT(ic)))\
                              && IC_RESULT(ic)->isaddr )
 
 #define POINTER_GET(ic) ( ic && ic->op == GET_VALUE_AT_ADDRESS  \
-                             &&  (IS_ITEMP(IC_LEFT(ic)) || IS_OP_LITERAL(IC_LEFT(ic)))\
-                             &&  IC_LEFT(ic)->isaddr )
+                             && (IS_ITEMP(IC_LEFT(ic)) || IS_OP_LITERAL(IC_LEFT(ic)))\
+                             && IC_LEFT(ic)->isaddr )
 
 #define IS_ARITHMETIC_OP(x) (x && (x->op == '+' || \
                                    x->op == '-' || \
@@ -322,6 +323,7 @@ symbol *newiTempLabel (char *);
 symbol *newiTempLoopHeaderLabel (bool);
 iCode *newiCode (int, operand *, operand *);
 sym_link *operandType (operand *);
+unsigned int operandSize (operand *);
 operand *operandFromValue (value *);
 operand *operandFromSymbol (symbol *);
 operand *operandFromLink (sym_link *);
@@ -337,6 +339,7 @@ bool isOperandInDirSpace (operand *);
 bool isOperandInCodeSpace (operand *);
 operand *opFromOpWithDU (operand *, bitVect *, bitVect *);
 iCode *copyiCode (iCode *);
+operand *newiTempOperand (sym_link *, char);
 operand *newiTempFromOp (operand *);
 iCode *getBuiltinParms (iCode *,int *, operand **);
 int isiCodeInFunctionCall (iCode *);