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
simplify 8*x as well as x*8
[qbe.git]
/
test
/
_fix4.ssa
blob
181768dd9a86473a363c5781916e68a15cc04f2f
1
function $test() {
2
@start
3
%x =w copy 3
4
%n =w copy 2
5
@loop
6
%c =w ceqw %n, 10000
7
jnz %c, @end, @next
8
@next
9
%t =w copy 3
10
%x =w add %x, 2
11
@tloop
12
%s =w mul %t, %t
13
%c =w csgtw %s, %x
14
jnz %c, @prime, @test
15
@test
16
%r =w rem %x, %t
17
jnz %r, @tnext, @loop
18
@tnext
19
%t =w add %t, 2
20
jmp @tloop
21
@prime
22
%n =w add %n, 1
23
jmp @loop
24
@end
25
storew %x, $a
26
ret
27
}