summary refs log tree commit diff
path: root/lisc/test/loop.ssa
blob: 06a4bee41a7b986fa92723cb667cc7d6b92a56ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# simple looping program
# sums all integers from 100 to 0

function $test {
@start

@loop
	%s  =w phi @start 100, @loop %s1
	%n  =w phi @start   0, @loop %n1
	%n1 =w sub %n, 1
	%s1 =w add %s, %n
	jnz %n1, @loop, @end

@end
	ret
}