removed debug.c
[muis.git] / run-test-on-test.sh
blobd902a161a7f2ad661eb2e909ba4b9298ba90911e
1 #!/bin/bash
2 # Original author: Nido Media
3 # Patches by:
4 # ...
6 # depends on the simplescalar sim-outorder MIPS emulator. Any suggestions
7 # welcome to change this
9 # Compiles the file test.c and checks the output of the reference with the
10 # optimised version of the program. muis is the optimiser for this.
11 CC=xgcc
12 I386CC=gcc
13 CFLAGS=-O0
14 SIM=sim-outorder
15 OPT=~/muis/muis/muis.py
16 OPTFLAGS=--agressive
17 X=true
19 $CC $CFLAGS -S test.c -o ref.s
20 $CC $CFLAGS ref.s -o ref
22 $OPT $OPTFLAGS ref.s opt.s >/dev/null || X=false
24 if $X
25 then
26 $CC $CFLAGS opt.s -o opt
28 $SIM ref > test.ref 2>/dev/null || true
29 $SIM opt > test.opt 2>/dev/null || true
31 test -n "`diff test.ref test.opt`" && X=false