summary refs log tree commit diff
path: root/lisc/lisc.h
diff options
context:
space:
mode:
Diffstat (limited to 'lisc/lisc.h')
-rw-r--r--lisc/lisc.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisc/lisc.h b/lisc/lisc.h
index 153d70f..3d5e38b 100644
--- a/lisc/lisc.h
+++ b/lisc/lisc.h
@@ -16,6 +16,7 @@ enum {
 	NIns    = 256,
 };
 
+typedef struct OpDesc OpDesc;
 typedef struct Ins Ins;
 typedef struct Phi Phi;
 typedef struct Blk Blk;
@@ -29,7 +30,7 @@ enum {
 
 	RMask = 1,
 	RShift = 1,
-	NRefs = ((ushort)-1)>>RShift,
+	NRef = ((ushort)-1)>>RShift,
 };
 
 #define SYM(x)   (((x)<<RShift) | RSym)
@@ -45,8 +46,16 @@ enum {
 
 	/* reserved instructions */
 	OX86Div,
+	OLast
 };
 
+struct OpDesc {
+	int arity;
+	int commut:1;
+	char *name;
+};
+extern OpDesc opdesc[];
+
 enum {
 	JXXX,
 	JRet,
@@ -110,6 +119,7 @@ struct Fn {
 /* parse.c */
 void *alloc(size_t);
 Fn *parsefn(FILE *);
+void printfn(Fn *, FILE *);
 
 /* ssa.c */
 void fillpreds(Fn *);