summary refs log tree commit diff
path: root/lisc/test
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-07 22:32:58 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-07 22:32:58 -0400
commit2205930c370db90941dc6d49ed659cbfc24c786b (patch)
treeb7e85210b3c2415172ee6b2dfa4976e5d3c13750 /lisc/test
parentfb423f749cc0f6f0cceea7d8b77be5a0d807e26d (diff)
downloadroux-2205930c370db90941dc6d49ed659cbfc24c786b.tar.gz
store the byte array in max.ssa
Diffstat (limited to 'lisc/test')
-rw-r--r--lisc/test/max.ssa7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisc/test/max.ssa b/lisc/test/max.ssa
index e9c0c43..0a099fd 100644
--- a/lisc/test/max.ssa
+++ b/lisc/test/max.ssa
@@ -2,14 +2,15 @@
 # in a nul-terminated array
 # of unsigned bytes
 #
-# b input array
-# a output max
+# the output is stored in $a
+
+data $arr = { b 10, b -60, b 10, b 100, b 200, b 0 }
 
 function $test() {
 @start
 @loop
 	%max =w phi @start -1, @new %byt, @old %max
-	%loc =l phi @start $b,  @new %loc1, @old %loc1
+	%loc =l phi @start $arr,  @new %loc1, @old %loc1
 	%byt =w loadub %loc
 	%loc1 =l add 1, %loc
 	jnz %byt, @iter, @end