2009-08-09 00:08:41 -04:00
|
|
|
#!/bin/bash
|
2009-09-18 16:51:52 -04:00
|
|
|
echo -ne "cpu \t"
|
2009-08-09 00:08:41 -04:00
|
|
|
../config.guess | cut -d - -f 1
|
|
|
|
TMPFILE=$(tempfile)
|
|
|
|
for fn in mpn_add_n mpn_sub_n mpn_mul_1.333 mpn_addmul_1.333 mpn_submul_1.333 mpn_mul_2 mpn_addmul_2 mpn_submul_2 \
|
|
|
|
mpn_addadd_n mpn_addsub_n mpn_subadd_n mpn_lshift.3 mpn_rshift.3 mpn_lshift2 mpn_rshift2 mpn_lshift1 mpn_rshift1 \
|
2009-08-23 13:11:02 -04:00
|
|
|
mpn_addlsh1_n mpn_sublsh1_n mpn_addlsh_n.3 mpn_sublsh_n.3 mpn_inclsh_n.3 mpn_declsh_n.3 \
|
2009-09-18 19:00:40 -04:00
|
|
|
mpn_rsh1add_n mpn_rsh1sub_n mpn_sumdiff_n mpn_store MPN_ZERO mpn_copyi MPN_COPY_INCR mpn_copyd MPN_COPY_DECR \
|
2009-08-09 00:08:41 -04:00
|
|
|
mpn_popcount mpn_hamdist mpn_com_n mpn_neg_n mpn_and_n mpn_xor_n mpn_ior_n mpn_nand_n mpn_nior_n mpn_xnor_n mpn_andn_n \
|
2009-09-25 12:11:05 -04:00
|
|
|
mpn_iorn_n mpn_lshiftc.3 mpn_divexact_byff mpn_divexact_byBm1of.3 mpn_divexact_by3 mpn_divexact_1.3333 mpn_modexact_1c_odd.334333 \
|
2009-09-18 16:51:52 -04:00
|
|
|
mpn_add_err1_n mpn_sub_err1_n \
|
2009-09-18 18:56:19 -04:00
|
|
|
mpn_divrem_euclidean_qr_1.77777 mpn_divrem_euclidean_qr_2 mpn_divrem_euclidean_r_1.77777 mpn_divrem_1.77777 mpn_divrem_2 \
|
2009-09-29 22:24:29 -04:00
|
|
|
mpn_divrem_hensel_qr_1.3333 mpn_divrem_hensel_qr_1_1.3333 mpn_divrem_hensel_qr_1_2.3333 \
|
|
|
|
mpn_divrem_hensel_r_1.3333 mpn_divrem_hensel_rsh_qr_1.3333 mpn_rsh_divrem_hensel_qr_1.3333 \
|
2009-10-03 19:13:13 -04:00
|
|
|
mpn_rsh_divrem_hensel_qr_1_1.3333 mpn_rsh_divrem_hensel_qr_1_2.3333 \
|
2009-10-02 20:33:40 -04:00
|
|
|
mpn_mod_1_1 mpn_mod_1_2 mpn_mod_1_3 mpn_mod_34lsub1
|
2009-08-09 00:08:41 -04:00
|
|
|
do
|
|
|
|
fnc=$(echo $fn | cut -d _ -f 2- | cut -d . -f 1)
|
2009-10-03 22:16:25 -04:00
|
|
|
while [ $(echo "$fnc" | wc -c) -le 24 ]
|
2009-08-09 00:08:41 -04:00
|
|
|
do
|
|
|
|
fnc=$(echo " $fnc")
|
|
|
|
done
|
|
|
|
echo -ne "$fnc\t"
|
|
|
|
./speed -c -s 1000 $fn > $TMPFILE 2>&1
|
|
|
|
if [ $? -eq 0 ] ; then
|
|
|
|
cat $TMPFILE | tail -n 1 | tr -s " " | cut -f 2 -d " " | cut -d . -f 1
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm -f $TMPFILE
|