summary refs log tree commit diff
path: root/test/collatz.ssa
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-12 13:24:57 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-12 14:51:50 -0400
commit4ce295adadc67f66b01b1841db394f60dda3956b (patch)
treedd787a68f004af5501015476bac5da740ace82cf /test/collatz.ssa
parent4999d6ebf001ab3c1ae735cc0888521e0a27f9aa (diff)
downloadroux-4ce295adadc67f66b01b1841db394f60dda3956b.tar.gz
use a shift to divide by 2 in collatz
Diffstat (limited to 'test/collatz.ssa')
-rw-r--r--test/collatz.ssa2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/collatz.ssa b/test/collatz.ssa
index 0a593b1..73e16ea 100644
--- a/test/collatz.ssa
+++ b/test/collatz.ssa
@@ -29,7 +29,7 @@ function $test() {
 	%n2 =w add %n1, 1
 	jmp @cloop
 @even
-	%n3 =w div %n0, 2
+	%n3 =w shr %n0, 1
 	jmp @cloop
 @getmemo                     # get the count for n0 in mem
 	%n0l =l extsw %n0