counts.sh
author Ryan C. Gordon <icculus@icculus.org>
Thu, 12 Feb 2009 01:47:35 -0500
changeset 573 1cd1d99a79cb
parent 357 4b267433af82
child 591 20a0ac14babf
permissions -rwxr-xr-x
Rearrange how we test for register names to avoid substring matches. For example: "oD" would match "oDepth" and cause all sorts of chaos.

#!/bin/sh

for feh in ??_?_?/*.bytecode ; do
    echo -n "$feh "
    echo -n `./testparse glsl $feh |grep "INSTRUCTION COUNT: " |perl -w -p -e 's/\AINSTRUCTION COUNT://;'`
    echo -n " vs. "
    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#;'
done