counts.sh
author Ryan C. Gordon <icculus@icculus.org>
Fri, 12 Dec 2008 00:58:10 -0500
changeset 503 ec8e7739cf5d
parent 357 4b267433af82
child 591 20a0ac14babf
permissions -rwxr-xr-x
Let finderrors work on assembly programs.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
357
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
#!/bin/sh
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
for feh in ??_?_?/*.bytecode ; do
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
    echo -n "$feh "
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
    echo -n `./testparse glsl $feh |grep "INSTRUCTION COUNT: " |perl -w -p -e 's/\AINSTRUCTION COUNT://;'`
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
    echo -n " vs. "
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
    grep "instruction slots used" `echo $feh |perl -w -p -e 's/bytecode\Z/disasm/;'` |perl -w -p -e 's#\A// approximately (\d+) instruction slots used .*?\Z#$1#;'
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
done
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9