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
Drop quotes around floating point constant labels
[qbe.git]
/
test
/
eucl.ssa
blob
838c1b8c3cfc9d47d96b0973c54188dd15440677
1
# euclide's algorithm in ssa
2
# it is a fairly interesting
3
# ssa program because of the
4
# swap of b and a
5
6
export
7
function $test() {
8
@start
9
10
@loop
11
%a =w phi @start 380, @loop %r
12
%b =w phi @start 747, @loop %a
13
%r =w rem %b, %a
14
jnz %r, @loop, @end
15
16
@end
17
storew %a, $a
18
ret
19
}
20
21
# >>> driver
22
# extern void test(void);
23
# int a;
24
# int main() { test(); return !(a == 1); }
25
# <<<