summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-11-24 11:38:24 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-11-24 11:38:24 -0500
commit51a5a66d96eb84258433d7f2781cd1106e3e0c6f (patch)
tree80ba7c24d12965675335cde3ab0438539e139172
parent8874fe7fc4e0bb1cef6e9a7409826aae7a00c1e9 (diff)
downloadroux-51a5a66d96eb84258433d7f2781cd1106e3e0c6f.tar.gz
add minic generated Euclide algorithm
-rw-r--r--lisc/test/euclc.ssa25
1 files changed, 25 insertions, 0 deletions
diff --git a/lisc/test/euclc.ssa b/lisc/test/euclc.ssa
new file mode 100644
index 0000000..b684fe7
--- /dev/null
+++ b/lisc/test/euclc.ssa
@@ -0,0 +1,25 @@
+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
+}
+