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

@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