add sign/zero extension operations

This commit is contained in:
Quentin Carbonneaux 2015-08-17 19:00:51 -04:00
parent 5668e93147
commit 40d0582ee0
5 changed files with 23 additions and 2 deletions

View file

@ -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