testbed is now functional
I would like to make sure some _ tests are passing, however I have to think of a nice way to grab debug output and compare it nicely. Some require NReg == 3, that is a pain in the ass. Maybe they can be changed to work for the full register set.
This commit is contained in:
parent
99965071d2
commit
67f611fbef
27 changed files with 97 additions and 19 deletions
27
lisc/test/_fix4.ssa
Normal file
27
lisc/test/_fix4.ssa
Normal file
|
@ -0,0 +1,27 @@
|
|||
function $test() {
|
||||
@start
|
||||
%x =w copy 3
|
||||
%n =w copy 2
|
||||
@loop
|
||||
%c =w ceqw %n, 10000
|
||||
jnz %c, @end, @next
|
||||
@next
|
||||
%t =w copy 3
|
||||
%x =w add %x, 2
|
||||
@tloop
|
||||
%s =w mul %t, %t
|
||||
%c =w csgtw %s, %x
|
||||
jnz %c, @prime, @test
|
||||
@test
|
||||
%r =w rem %x, %t
|
||||
jnz %r, @tnext, @loop
|
||||
@tnext
|
||||
%t =w add %t, 2
|
||||
jmp @tloop
|
||||
@prime
|
||||
%n =w add %n, 1
|
||||
jmp @loop
|
||||
@end
|
||||
storew %x, $a
|
||||
ret
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue