updated be_AddSP semantics
[libfirm] / ir / be / test / makereport.sh
index 6c91154..cb36e09 100755 (executable)
@@ -11,15 +11,18 @@ else
 fi
 
 EXEC_PREFIX=
-ECC="eccp"
+if [ "$ECC" = "" ]; then
+       ECC="eccp"
+fi
 #EXEC_PREFIX="qemu-arm"
 #ECC="/ben/beck/ipd/bin/eccp -march=arm -bra-chordal-co-algo=heur"
-ECC_CFLAGS="${ADDCFLAGS} -v -O3 -D__builtin_memcpy=memcpy -D__builtin_memset=memset -D__builtin_strlen=strlen -D__builtin_strcpy=strcpy -D__builtin_strcmp=strcmp -DNO_TRAMPOLINES -ffp-strict"
-GCC="gcc"
-GCC_CFLAGS="-O0 -Itcc -m32"
+ECC_CFLAGS="${ADDCFLAGS} -v -O3 -ffp-strict"
+GCC="icc -restrict"
+GCC_CFLAGS="-O0 -Itcc -fp-model precise"
 LINKFLAGS="-lm"
 TIMEOUT_COMPILE=300
 TIMEOUT_RUN=30
+ECC_LINK="gcc -m32"
 
 CFILES="*.c"
 OUTPUTDIR="stats-`date +%y.%m.%d`"
@@ -39,7 +42,7 @@ cat > $XMLRES << __END__
 __END__
 
 # so endless apps stop at some point...
-#ulimit -t2
+#ulimit -t 2
 
 basedir=`pwd`
 
@@ -61,19 +64,19 @@ for file in $curdir/$CFILES; do
     name="`basename $file .c`"
        obj_name="build_firm/$name.o"
     res="$OUTPUTDIR/buildresult_$name.txt"
-    echo "Building $name"
+    echo -n "Building $name"
     echo "Results for $name" > $res
     echo "*** ECC/FIRM Compile" >> $res
-    CMD="ulimit -t${TIMEOUT_COMPILE} ; ${ECC} -c -o ${obj_name} ${ECC_CFLAGS} ${FILE_FLAGS} ${file}"
+    CMD="ulimit -t ${TIMEOUT_COMPILE} ; ${ECC} -c -o ${obj_name} ${ECC_CFLAGS} ${FILE_FLAGS} ${file}"
     echo "$CMD" >> $res
-    /bin/bash -c "$CMD" >> $res 2>&1 || COMPILE_RES="failed"
+    /bin/sh -c "$CMD" >> $res 2>&1 || { COMPILE_RES="failed"; echo -n " ... FAILED"; }
 
-    if [ ${COMPILE_RES} == "ok" ]; then
+    if [ ${COMPILE_RES} = "ok" ]; then
         LINK_RES="ok"
         echo "*** Linking" >> $res
-        CMD="${ECC} $obj_name ${LINKFLAGS} -o build_firm/$name.exe"
+        CMD="${ECC_LINK} $obj_name ${LINKFLAGS} -o build_firm/$name.exe"
         echo "$CMD" >> $res
-        $CMD >> $res 2>&1 || LINK_RES="failed"
+        $CMD >> $res 2>&1 || { LINK_RES="failed"; echo -n " ... FAILED"; }
     fi
 
     echo "*** GCC Compile" >> $res
@@ -85,18 +88,18 @@ for file in $curdir/$CFILES; do
         GCC_RUN_RES="ok"
 
         echo "*** Run GCC" >> $res
-        CMD="ulimit -t${TIMEOUT_RUN} ; build_gcc/$name.exe > $OUTPUTDIR/result_gcc_$name.txt 2>&1"
+        CMD="ulimit -t ${TIMEOUT_RUN} ; build_gcc/$name.exe > $OUTPUTDIR/result_gcc_$name.txt 2>&1"
         echo "$CMD" >> $res
-        /bin/bash -c "ulimit -t${TIMEOUT_RUN} ; build_gcc/$name.exe" > $OUTPUTDIR/result_gcc_$name.txt 2>&1 || GCC_RUN_RES="failed"
+        /bin/sh -c "$CMD" > $OUTPUTDIR/result_gcc_$name.txt 2>&1 || GCC_RUN_RES="failed"
     fi
 
     if [ ${LINK_RES} = "ok" ]; then
         FIRM_RUN_RES="ok"
 
         echo "*** Run Firm" >> $res
-        CMD="ulimit -t${TIMEOUT_RUN} ; build_firm/$name.exe > $OUTPUTDIR/result_firm_$name.txt 2>&1"
+        CMD="ulimit -t ${TIMEOUT_RUN} ; ${EXEC_PREFIX} build_firm/$name.exe > $OUTPUTDIR/result_firm_$name.txt 2>&1"
         echo "$CMD" >> $res
-        /bin/bash -c "ulimit -t${TIMEOUT_RUN} ; ${EXEC_PREFIX} build_firm/$name.exe" > $OUTPUTDIR/result_firm_$name.txt 2>&1 || FIRM_RUN_RES="failed"
+        /bin/sh -c "$CMD" > $OUTPUTDIR/result_firm_$name.txt 2>&1 || { FIRM_RUN_RES="failed"; echo -n " ... FAILED"; }
     fi
 
     if [ ${GCC_RUN_RES} = "ok" -a ${FIRM_RUN_RES} = "ok" ]; then
@@ -104,8 +107,9 @@ for file in $curdir/$CFILES; do
 
         echo "*** Compare Results" >> $res
         CMD="diff -u $OUTPUTDIR/result_gcc_$name.txt $OUTPUTDIR/result_firm_$name.txt"
-        $CMD > $OUTPUTDIR/result_diff_$name.txt 2>&1 || DIFF_RES="failed"
+        $CMD > $OUTPUTDIR/result_diff_$name.txt 2>&1 || { DIFF_RES="failed"; echo -n " ... FAILED"; }
     fi
+    echo
 
     cat >> $XMLRES << __END__
     <result name="$name">