blob: 0dba165a75f2662717e4542e5c70d112694cc6b4 [file] [log] [blame]
Eric Biederman90089602004-05-28 14:11:54 +00001#!/bin/sh
2# Allow core dumps
3ulimit -c hard
4set -x
5N=''
6root=simple_test
7#root=simple_test
8#root=linux_test
9#root=raminit_test
10if [ -n "$2" -a -n "$1" ] ; then
11 root=$1
12 N=$2
13elif [ -n "$1" ] ; then
14 root=$1
15else
16 echo "too few arguments"
17 exit 1
18fi
19ROMCC=./romcc
20stem="$root$N"
21base=tests/$stem
22op="-Itests/include"
23op="$op -feliminate-inefectual-code -fsimplify -fscc-transform "
24#op="$op -O2"
25op="$op -finline-policy=defaulton"
26#op="$op -finline-policy=nopenalty"
27#op="$op -finline-policy=never"
28op="$op -fdebug -fdebug-triples -fdebug-interference -fdebug-verification"
29#op="$op -fdebug-inline"
30#op="$op -fdebug-calls"
31#op="$op -mnoop-copy"
32#op="$op -fsimplify -fno-simplify-op -fno-simplify-phi -fno-simplify-label -fno-simplify-branch -fno-simplify-copy -fno-simplify-arith -fno-simplify-shift -fno-simplify-bitwise -fno-simplify-logical"
33#op="$op -fdebug-rebuild-ssa-form"
34op="$op -fmax-allocation-passes=8"
35op="$op -fdebug-live-range-conflicts"
36op="$op -fdebug-scc-transform"
37op="$op -fdebug-scc-transform2"
38#-fdebug-coalescing
39#-fdebug-coalesing2
40#-fno-simplify-call "
41#-fno-always-inline"
42#
43#op="-O2 -mmmx -msse --debug=4294967295"
44#op="-fdebug -fdebug-triples -fdebug-inline -O2 -mmmx -msse -fno-always-inline "
45#op="-fdebug -fdebug-inline -O2 -mmmx "
46#op="-fdebug -fdebug-live-range-conflicts -fdebug-live-range-conflicts2 -fno-debug-interference -fdebug-color-graph -fdebug-coalescing -fmax-allocation-passes=10 -O2 -mmmx -msse"
47#op="-fdebug -O2 -mmmx -msse"
48#op="-fdebug -fdebug-inline -fno-eliminate-inefectual-code -fno-always-inline -mmmx"
49#op="-fdebug -fdebug-inline -fno-always-inline -mmmx"
50export ALLOC_CHECK_=2
51rm -f core $base.S $base.debug $base.debug2 $base.elf $base.out &&
52make romcc &&
53$ROMCC $op -o $base.S $base.c 2>&1 > $base.debug | tee $base.debug2
54if [ '(' -f $base.c ')' -a '(' '!' -f core ')' -a '(' -f $base.S ')' ]; then
55 if [ "$stem" = "linux_test$N" ] ; then
56 as $base.S -o $base.o &&
57 ld -T tests/ldscript.ld $base.o -o $base.elf &&
58 ./$base.elf > $base.out &&
59 diff -u results/$stem.out $base.out
60 else
61 /bin/true
62 fi
63else
64 /bin/false
65fi
66
67