extract tests out of src

This commit is contained in:
Quentin Carbonneaux 2016-03-27 15:00:45 -04:00
parent aad52241c8
commit 36635660b4
35 changed files with 10 additions and 3 deletions

24
test/eucl.ssa Normal file
View file

@ -0,0 +1,24 @@
# euclide's algorithm in ssa
# it is a fairly interesting
# ssa program because of the
# swap of b and a
function $test() {
@start
@loop
%a =w phi @start 380, @loop %r
%b =w phi @start 747, @loop %a
%r =w rem %b, %a
jnz %r, @loop, @end
@end
storew %a, $a
ret
}
# >>> driver
# extern void test(void);
# int a;
# int main() { test(); return !(a == 1); }
# <<<