* src/SDCCicode.h: removed buggy semicolon in unused macro
[fw/sdcc] / src / SDCCicode.h
index 98469dba845b4cca33b707b6acd2ab2865adc58a..e4c3c1be1d55c3fc3e1d86a6c1024b5b7a5c0b8c 100644 (file)
@@ -61,7 +61,7 @@ OPTYPE;
 #define LRTYPE        LRFTYPE LRETYPE
 #define IS_ITEMP(op)       (IS_SYMOP(op) && op->operand.symOperand->isitmp == 1)
 #define IS_PARM(op)        (IS_SYMOP(op) && op->operand.symOperand->_isparm)
-#define IS_ITEMPLBL(op)    (IS_ITEMP(op) && op->operand.symOperand->isilbl == 1);
+#define IS_ITEMPLBL(op)    (IS_ITEMP(op) && op->operand.symOperand->isilbl == 1)
 #define IS_OP_VOLATILE(op) (IS_SYMOP(op) && op->isvolatile)
 #define IS_OP_LITERAL(op)  (op && op->isLiteral)
 #define IS_OP_GLOBAL(op)   (IS_SYMOP(op) && op->isGlobal)
@@ -207,25 +207,27 @@ typedef struct icodeFuncTable
 iCodeTable;
 
 /* useful macros */
-#define SKIP_IC2(x)  (x->op == GOTO     ||     \
-                      x->op == LABEL    ||     \
-                      x->op == FUNCTION ||     \
-                      x->op == INLINEASM ||    \
-                      x->op == ENDFUNCTION   )
+#define SKIP_IC2(x)  (x->op == GOTO         ||    \
+                      x->op == LABEL        ||    \
+                      x->op == FUNCTION     ||    \
+                      x->op == INLINEASM    ||    \
+                      x->op == ENDFUNCTION  )
 
-#define SKIP_IC1(x)  (x->op == CALL     ||     \
+#define SKIP_IC1(x)  (x->op == CALL         ||    \
                       SKIP_IC2(x) )
 
-#define SKIP_IC(x)   (x->op == PCALL    ||     \
-                      x->op == IPUSH    ||     \
-                      x->op == IPOP     ||     \
-                      x->op == JUMPTABLE ||    \
-                      x->op == RECEIVE  ||     \
-                      x->op == ARRAYINIT ||    \
-                      SKIP_IC1(x)||  \
+#define SKIP_IC(x)   (x->op == PCALL        ||    \
+                      x->op == IPUSH        ||    \
+                      x->op == IPOP         ||    \
+                      x->op == JUMPTABLE    ||    \
+                      x->op == RECEIVE      ||    \
+                      x->op == ARRAYINIT    ||    \
+                      SKIP_IC1(x)           ||    \
+                      x->op == CRITICAL     ||    \
+                      x->op == ENDCRITICAL  ||    \
                       x->op == SEND         )
 
-#define SKIP_IC3(x) (SKIP_IC2(x) ||     \
+#define SKIP_IC3(x) (SKIP_IC2(x)            ||    \
                      x->op == JUMPTABLE )
 
 #define IS_CONDITIONAL(x) (x->op == EQ_OP || \
@@ -254,6 +256,14 @@ iCodeTable;
                                 x->op == '|'        || \
                                 x->op == '^'))
 
+#define IS_ASSOCIATIVE(x) (x && (x->op == EQ_OP      || \
+                                 x->op == NE_OP      || \
+                                 x->op == '+'        || \
+                                 x->op == '*'        || \
+                                 x->op == BITWISEAND || \
+                                 x->op == '|'        || \
+                                 x->op == '^'))
+
 #define ASSIGNMENT(ic) ( ic && ic->op == '=')
 
 #define ASSIGN_SYM_TO_ITEMP(ic) (ic && ic->op == '=' && \
@@ -308,7 +318,8 @@ int isParameterToCall (value *, operand *);
 iCode *newiCodeLabelGoto (int, symbol *);
 symbol *newiTemp (char *);
 symbol *newiTempLabel (char *);
-symbol *newiTempPreheaderLabel ();
+#define LOOPEXITLBL "loopExitLbl"
+symbol *newiTempLoopHeaderLabel (bool);
 iCode *newiCode (int, operand *, operand *);
 sym_link *operandType (operand *);
 operand *operandFromValue (value *);
@@ -320,6 +331,7 @@ int piCode (void *, FILE *);
 int printOperand (operand *, FILE *);
 void setOperandType (operand *, sym_link *);
 bool isOperandInFarSpace (operand *);
+bool isOperandInPagedSpace (operand *);
 bool isOperandInDirSpace (operand *);
 bool isOperandInCodeSpace (operand *);
 operand *opFromOpWithDU (operand *, bitVect *, bitVect *);