diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-27 15:00:45 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-27 15:00:45 -0400 |
commit | 36635660b40573f6a0c19d50dfdd9277589030de (patch) | |
tree | a1b4463f7260462c314bd8d7cb35b3d199143f33 /test/euclc.ssa | |
parent | aad52241c88ad5327a8488c66dc906c8393c9c92 (diff) | |
download | roux-36635660b40573f6a0c19d50dfdd9277589030de.tar.gz |
extract tests out of src
Diffstat (limited to 'test/euclc.ssa')
-rw-r--r-- | test/euclc.ssa | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/euclc.ssa b/test/euclc.ssa new file mode 100644 index 0000000..c76db2f --- /dev/null +++ b/test/euclc.ssa @@ -0,0 +1,29 @@ +function w $test() { +@l0 + %a =l alloc4 4 + %b =l alloc4 4 + %r =l alloc4 4 + storew 747, %a + storew 380, %b +@l1 + %t4 =w loadw %b + jnz %t4, @l2, @l3 +@l2 + %t7 =w loadw %a + %t8 =w loadw %b + %t6 =w rem %t7, %t8 + storew %t6, %r + %t10 =w loadw %b + storew %t10, %a + %t12 =w loadw %r + storew %t12, %b + jmp @l1 +@l3 + %t13 =w loadw %a + ret %t13 +} + +# >>> driver +# extern int test(void); +# int main() { return !(test() == 1); } +# <<< |