repo.or.cz
/
qbe.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
mark printf call as variadic in test
[qbe.git]
/
test
/
puts10.ssa
blob
8c6ed5e6033ab15173e40cc433d5aa2ba12e906f
1
export
2
function $main() {
3
@start
4
%y =l alloc4 4
5
%y1 =l add %y, 1
6
storeb 0, %y1
7
@loop
8
%n =w phi @start 0, @loop %n1
9
%c =w add %n, 48
10
storeb %c, %y
11
%r =w call $puts(l %y)
12
%n1 =w add %n, 1
13
%cmp =w cslew %n1, 9
14
jnz %cmp, @loop, @end
15
@end
16
ret
17
}
18
19
# >>> output
20
# 0
21
# 1
22
# 2
23
# 3
24
# 4
25
# 5
26
# 6
27
# 7
28
# 8
29
# 9
30
# <<<