| |
|
| vectors=unverified.test-vectors; |
vectors=unverified.test-vectors; |
| |
|
| |
mk () |
| |
{ |
| |
make comp="$comp" opt="$opt" arch="$arch" var="$var" $1; |
| |
} |
| |
|
| run () |
run () |
| { |
{ |
| if [ -e ./reports/info_$id ]; then |
if [ -e ./reports/info_$id ]; then |
| |
|
| echo "compiling $id"; |
echo "compiling $id"; |
| |
|
| make compiler="$compiler" clean &> /dev/null; |
make comp="$comp" clean &> /dev/null; |
| |
|
| cat > ./reports/info_current <<EOF |
cat > ./reports/info_current <<EOF |
| DATE: |
DATE: |
| |
|
| COMPILER: |
COMPILER: |
| ------------------------------------------------------------------------------- |
------------------------------------------------------------------------------- |
| $(make compiler="$compiler" version 2>&1) |
$(mk version 2>&1) |
| |
|
| COMPILATION: |
COMPILATION: |
| ------------------------------------------------------------------------------- |
------------------------------------------------------------------------------- |
| $(make compiler="$compiler" opt="$opt" arch="$arch" 2>&1) |
make comp="$comp" opt="$opt" arch="$arch" var="$var" |
| |
|
| |
$(mk 2>&1) |
| |
|
| EXECUTABLE: |
EXECUTABLE: |
| ------------------------------------------------------------------------------- |
------------------------------------------------------------------------------- |
| EOF |
EOF |
| |
|
| if make compiler="$compiler" -q &> /dev/null; then |
if mk -q &> /dev/null; then |
| hash=$(make compiler="$compiler" hash 2> /dev/null); |
hash=$(mk hash 2> /dev/null); |
| else |
else |
| echo "none" >> ./reports/info_current; |
echo "none" >> ./reports/info_current; |
| mv ./reports/info_current ./reports/errors_$id; |
mv ./reports/info_current ./reports/errors_$id; |
| return; |
return; |
| fi |
fi |
| |
|
| test=$(make compiler="$compiler" command); |
test=$(mk command); |
| |
|
| echo "generating test vectors"; |
echo "generating test vectors"; |
| |
|
| rm -f ./reports/info_current |
rm -f ./reports/info_current |
| } |
} |
| |
|
| touch .dummy.c |
dir=$1; |
| |
|
| |
if [ -z "$dir" ]; then |
| |
dir=.; |
| |
fi |
| |
|
| |
echo "entering directory $dir"; |
| |
|
| |
# first recursively process all subdirectories |
| |
|
| |
for i in "$dir"/*; do |
| |
if [ -d "$i" ]; then |
| |
$0 "$i"; |
| |
fi |
| |
done |
| |
|
| |
cd "$dir"; |
| |
|
| |
if [ ! -e unverified.test-vectors ]; then |
| |
exit; |
| |
fi |
| |
|
| mkdir -p reports; |
mkdir -p reports; |
| |
|
| if true; then |
if true; then |
| compiler=gcc; |
comp=gcc; |
| |
|
| for cpu in \ |
for cpu in \ |
| i386 i486 i586 pentium-mmx i686 pentium2 pentium3 \ |
i386 i486 i586 pentium-mmx i686 pentium2 pentium3 \ |
| pentium-m pentium4 prescott nocona \ |
pentium-m pentium4 prescott nocona \ |
| k6 k6-2 athlon athlon-4 k8; do |
k6 k6-2 athlon athlon-4 k8; do |
| if gcc -c .dummy.c -march=$cpu > /dev/null 2>&1; then |
arch="-march=$cpu"; opt=; var=; |
| |
|
| |
if mk check &> /dev/null; then |
| for level in 0 1 2 3 s; do |
for level in 0 1 2 3 s; do |
| id="$compiler-$level-$cpu"; |
opt="-fomit-frame-pointer -O$level"; var=; |
| opt="-fomit-frame-pointer -O$level"; |
|
| arch="-march=$cpu"; |
|
| |
|
| |
if mk check &> /dev/null; then |
| |
for variant in 1 2 3 4 5 6 7 8 9 10; do |
| |
var="$variant"; |
| |
|
| |
if mk check &> /dev/null; then |
| |
id="$comp-$variant-$level-$cpu"; |
| run; |
run; |
| |
fi |
| |
done |
| |
fi |
| done |
done |
| fi |
fi |
| done |
done |
| |
|
| make compiler="$compiler" clean; |
mk clean; |
| fi |
fi |
| |
|
| if true; then |
if true; then |
| compiler=icc; |
comp=icc; |
| |
|
| for cpu in K W N P B; do |
for cpu in K W N P B; do |
| if icc -c .dummy.c -x$cpu > /dev/null 2>&1; then |
arch="-x$cpu"; opt=; var=; |
| |
|
| |
if mk check &> /dev/null; then |
| for level in 0 1 2 3 s; do |
for level in 0 1 2 3 s; do |
| id="$compiler-$level-$cpu"; |
opt="-O$level"; var=; |
| opt="-O$level"; |
|
| arch="-x$cpu"; |
if mk check &> /dev/null; then |
| |
for variant in 1 2 3 4 5 6 7 8 9 10; do |
| |
var="$variant"; |
| |
|
| |
if mk check &> /dev/null; then |
| |
id="$comp-$variant-$level-$cpu"; |
| run; |
run; |
| |
fi |
| |
done |
| |
fi |
| done |
done |
| fi |
fi |
| done |
done |
| |
|
| make compiler="$compiler" clean; |
mk clean; |
| fi |
fi |
| |
|
| if true; then |
if true; then |
| compiler=msvc; |
comp=msvc; |
| |
|
| for cpu in 3 4 5 6 7 B; do |
for cpu in 3 4 5 6 7 B; do |
| if cl /nologo /c .dummy.c /G$cpu > /dev/null 2>&1; then |
arch="/G$cpu"; opt=; var=; |
| arch="/G$cpu"; |
|
| |
if mk check &> /dev/null; then |
| |
for variant in 1 2 3 4 5 6 7 8 9 10; do |
| |
var="$variant"; opt=; |
| |
|
| id="$compiler-x-$cpu"; |
if mk check &> /dev/null; then |
| opt="/Ox"; |
opt="/Ox"; |
| |
|
| |
if mk check &> /dev/null; then |
| |
id="$comp-$variant-x-$cpu"; |
| run; |
run; |
| |
fi |
| |
|
| id="$compiler-xr-$cpu"; |
|
| opt="/Ox /Gr"; |
opt="/Ox /Gr"; |
| |
|
| |
if mk check &> /dev/null; then |
| |
id="$comp-$variant-xr-$cpu"; |
| run; |
run; |
| fi |
fi |
| |
fi |
| done |
done |
| |
|
| make compiler="$compiler" clean; |
|
| fi |
fi |
| |
done |
| |
|
| rm -f .dummy.*; |
make comp="$comp" clean; |
| |
fi |