summaryrefslogtreecommitdiff
path: root/simple-reg.h
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-10-29 06:40:53 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-10-29 06:40:53 -0400
commit9f5d17f60dff613b7aeac7763c2aa5f4d4a2594c (patch)
treee32e33e68e91fe90614dddc75fa903fdae6bc926 /simple-reg.h
parent71033b4e5a43958c201ac25d55d16266e70e1d7b (diff)
simple reg
Diffstat (limited to 'simple-reg.h')
-rw-r--r--simple-reg.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/simple-reg.h b/simple-reg.h
new file mode 100644
index 0000000..e12cab5
--- /dev/null
+++ b/simple-reg.h
@@ -0,0 +1,21 @@
+typedef struct reg_alloc_t reg_alloc_t;
+typedef struct reg_info_t reg_info_t;
+
+#define MAX_REGISTERS 64
+
+struct reg_info_t
+{
+ int name;
+ int in_use;
+};
+
+struct reg_alloc_t
+{
+ reg_info_t info[MAX_REGISTERS];
+ int n_registers;
+};
+
+void reg_alloc_init (reg_alloc_t *reg_alloc,
+ int n_registers,
+ int *registers);
+reg_info_t *reg_alloc_alloc (reg_alloc_t *reg_alloc);