summary refs log tree commit diff
path: root/lisc/lisc.h
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-07-30 21:32:43 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:29 -0400
commit92be2fdd177503e315ae433b30bdc1c0c21faf38 (patch)
treed99486e0d56f317d26d88fad92e95be4ece784a6 /lisc/lisc.h
parent837c46ca813da15d57cf65273da03de9ccbe548c (diff)
downloadroux-92be2fdd177503e315ae433b30bdc1c0c21faf38.tar.gz
start improving constants support
Diffstat (limited to 'lisc/lisc.h')
-rw-r--r--lisc/lisc.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/lisc/lisc.h b/lisc/lisc.h
index d1c25f0..7f558b0 100644
--- a/lisc/lisc.h
+++ b/lisc/lisc.h
@@ -1,5 +1,5 @@
 #include <assert.h>
-#include <stdint.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -13,6 +13,7 @@ typedef struct Ins Ins;
 typedef struct Phi Phi;
 typedef struct Blk Blk;
 typedef struct Sym Sym;
+typedef struct Const Const;
 typedef struct Fn Fn;
 
 enum {
@@ -158,9 +159,20 @@ struct Sym {
 	int hint;
 };
 
+struct Const {
+	enum {
+		CUndef,
+		CNum,
+		CAddr,
+	} type;
+	char label[NString];
+	int64_t val;
+};
+
 struct Fn {
 	Blk *start;
 	Sym *sym;
+	Const *cst;
 	int ntmp;
 	int nblk;
 	Blk **rpo;