turn test files in one function definition

This commit is contained in:
Quentin Carbonneaux 2015-09-07 22:11:43 -04:00
parent 87ab8941ed
commit a1b3e82dc9
16 changed files with 114 additions and 82 deletions

View file

@ -5,20 +5,22 @@
# b input array
# a output max
@start
@loop
function $test {
@start
@loop
%max =w phi @start -1, @new %byt, @old %max
%loc =l phi @start $b, @new %loc1, @old %loc1
%byt =w loadub %loc
%loc1 =l add 1, %loc
jnz %byt, @iter, @end
@iter
@iter
%cmp =w csle %max, %byt
jnz %cmp, @new, @old
@new
@new
jmp @loop
@old
@old
jmp @loop
@end
@end
storew %max, $a
ret
}