summary refs log tree commit diff
path: root/lisc/tools
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-08-18 21:35:19 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:32 -0400
commit61d07bbb147018cffd2120754c1f3f4f20f3f4dc (patch)
tree9bff08f4a43114c0a9261a355bfc554df1b86558 /lisc/tools
parente9bb9e586bb18a6e8a63af5e73a4d1d47f6222c9 (diff)
downloadroux-61d07bbb147018cffd2120754c1f3f4f20f3f4dc.tar.gz
slight update to slot tests
Diffstat (limited to 'lisc/tools')
-rw-r--r--lisc/tools/slot.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisc/tools/slot.c b/lisc/tools/slot.c
index ead0034..4b97be7 100644
--- a/lisc/tools/slot.c
+++ b/lisc/tools/slot.c
@@ -1,6 +1,6 @@
 /*% clang -g -Wall -o # %
  *
- * This is a test program for the slot
+ * This is a test program for the slota
  * routine in isel.c, it's a tricky beast
  * so when you modify it you can use this
  * test program to debug your changes.
@@ -15,10 +15,9 @@
 #define VARL 1
 
 enum { N = 3 };
-static int sa[N] = {0, 0, 2};
 
 static int
-slot(int sz, int al)
+slota(int sz, int al, int *sa)
 {
 	int j, k, s, l, a, ret;
 
@@ -76,6 +75,7 @@ enum { S = 300 };
 int
 main(int ac, char *av[])
 {
+	int sa[N] = {0, 0, 2};
 	char stk[S] = {0}, buf[4] = {0};
 	unsigned seed;
 	int i, a, l, s, itr;
@@ -105,7 +105,7 @@ main(int ac, char *av[])
 			l = 1 << a;
 			printf("[(%02d) xx %d] ", itr, a);
 		}
-		s = slot(l, a);
+		s = slota(l, a, sa);
 		if (s > S)
 			break;
 		if ((s+2) % (1 << a) != 0) {