]> iEval git - audio-libsamplerate.git/blob - check_asm.sh
5b7f0bd830b2139f9b73cb55a71349890a629c9f
[audio-libsamplerate.git] / check_asm.sh
1 #!/bin/sh
2
3 # Copyright (C) 2004-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18
19 #=======================================================================
20 # This short test script compiles the file src_sinc.c into assembler
21 # output and the greps the assembler output for the fldcw (FPU Load
22 # Control Word) instruction which is very detrimental to the perfromance
23 # of floating point code.
24
25 echo -n " Checking assembler output for bad code : "
26
27 if [ $# -ne 1 ]; then
28 echo "Error : Need the name of the input file."
29 exit 1
30 fi
31
32 filename=$1
33
34 if [ ! -f $filename ];then
35 echo "Error : Can't find file $filename."
36 exit 1
37 fi
38
39 count=`grep fldcw $filename | wc -l`
40
41 if [ $count -gt 0 ]; then
42 echo -e "\n\nError : found $count bad instructions.\n\n"
43 exit 1
44 fi
45
46 echo "ok"
47
This page took 0.042444 seconds and 3 git commands to generate.