diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-08-17 19:00:51 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:31 -0400 |
commit | 40d0582ee06232bf8290fafca476a3288488743d (patch) | |
tree | 7c3e4545237f662f5a40c2a0f42eb3aea7a94cad /lisc/test/collatz.ssa | |
parent | 5668e93147563c824e693255de5e58fdc398a36b (diff) | |
download | roux-40d0582ee06232bf8290fafca476a3288488743d.tar.gz |
add sign/zero extension operations
Diffstat (limited to 'lisc/test/collatz.ssa')
-rw-r--r-- | lisc/test/collatz.ssa | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisc/test/collatz.ssa b/lisc/test/collatz.ssa index 9f1c7b5..419bbaf 100644 --- a/lisc/test/collatz.ssa +++ b/lisc/test/collatz.ssa @@ -32,13 +32,15 @@ %n3 =w div %n0, 2 jmp @cloop @getmemo # get the count for n0 in mem - %idx0 =l mul %n0, 4 + %n0l =l sext %n0 + %idx0 =l mul %n0l, 4 %loc0 =l add %idx0, %mem %cn0 =w load %loc0 %c2 =w add %c0, %cn0 @endcl # store the count for n in mem %c =w phi @getmemo %c2, @cloop %c0 - %idx1 =l mul %n, 4 + %nl =l sext %n + %idx1 =l mul %nl, 4 %loc1 =l add %idx1, %mem storew %c, %loc1 %n9 =w add 1, %n |