date and time created 88/12/12 20:26:19 by kfall
[unix-history] / usr / src / old / pcc / c2.vax / c2.h
index 2cc4595..b30d8ef 100644 (file)
@@ -1,4 +1,4 @@
-/*     c2.h    4.7     83/08/11        */
+/*     c2.h    4.10    85/08/22        */
 
 /*
  * Header for object code improver
 
 /*
  * Header for object code improver
 #define JBCS 18
 #define JBSS 19
 
 #define JBCS 18
 #define JBSS 19
 
+#define        JCC 20
+#define        JCS 21
+#define        JVC 22
+#define        JVS 23
+
 /*
  *     When the new opcodes were added, the relative
  *     ordering of the first 3 (those that are not float)
 /*
  *     When the new opcodes were added, the relative
  *     ordering of the first 3 (those that are not float)
@@ -121,8 +126,13 @@ struct optab {
 } optab[];
 
 struct node {
 } optab[];
 
 struct node {
-       char    op;
-       char    subop;
+       union {
+               struct {
+                       char op_op;
+                       char op_subop;
+               } un_op;
+               short   un_combop;
+       } op_un;
        short   refc;
        struct  node    *forw;
        struct  node    *back;
        short   refc;
        struct  node    *forw;
        struct  node    *back;
@@ -133,9 +143,9 @@ struct node {
        short   seq;
 };
 
        short   seq;
 };
 
-struct {
-       short   combop;
-};
+#define op op_un.un_op.op_op
+#define subop op_un.un_op.op_subop
+#define combop op_un.un_combop
 
 char   line[512];
 struct node    first;
 
 char   line[512];
 struct node    first;
@@ -159,11 +169,8 @@ int nbj;
 int nfield;
 
 int    nchange;
 int nfield;
 
 int    nchange;
-int    isn;
+long   isn;
 int    debug;
 int    debug;
-char   *lasta;
-char   *lastr;
-char   *firstr;
 char   revbr[];
 #define        NREG    12
 char   *regs[NREG+5]; /* 0-11, 4 for operands, 1 for running off end */
 char   revbr[];
 #define        NREG    12
 char   *regs[NREG+5]; /* 0-11, 4 for operands, 1 for running off end */
@@ -177,10 +184,27 @@ char      ccloc[C2_ASIZE];
 #define RT4 15
 #define        LABHS   127
 
 #define RT4 15
 #define        LABHS   127
 
-struct { char lbyte; };
-
 char *copy();
 long getnum();
 struct node *codemove();
 struct node *insertl();
 struct node *nonlab();
 char *copy();
 long getnum();
 struct node *codemove();
 struct node *insertl();
 struct node *nonlab();
+
+#ifdef notdef
+#define decref(p) \
+       ((p) && --(p)->refc <= 0 ? nrlab++, delnode(p) : 0)
+#define delnode(p) \
+       ((p)->back->forw = (p)->forw, (p)->forw->back = (p)->back)
+#endif notdef
+
+char *xalloc();
+extern char *newa;
+extern char *lasta;
+extern char *lastr;
+#define        XALIGN(n) \
+               (((n)+(sizeof (char *) - 1)) & ~(sizeof (char *) - 1))
+#define        alloc(n) \
+               ((struct node *) \
+                ((newa = lasta) + (n) > lastr ? \
+                       xalloc(n) : \
+                       (lasta += XALIGN(n), newa)))