aboutsummaryrefslogtreecommitdiff
path: root/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/run.sh b/run.sh
new file mode 100755
index 0000000..a3f67c3
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,18 @@
+#! /bin/bash
+cp cibic testbed/
+cp lib.s testbed/
+cd testbed/
+for f in *.c
+do
+ echo $f
+ ./cibic $f > mips.s 2> /dev/null
+ gcc $f -m32 -std=c99 2> /dev/null
+ ./spim -stat -file mips.s > out
+ ./a.out > std
+ diff std out
+ if [[ "$?" != 0 ]]; then
+ echo "Wrong Answer!"
+ break;
+ fi
+done
+echo "OK."