浏览代码

use a shift to divide by 2 in collatz

Quentin Carbonneaux 9 年之前
父节点
当前提交
4ce295adad
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      test/collatz.ssa

+ 1 - 1
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