Bundle libsamplerate
[audio-libsamplerate.git] / libsamplerate / src / check_asm.sh
CommitLineData
8529da43
MG
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
25echo -n " Checking assembler output for bad code : "
26
27if [ $# -ne 1 ]; then
28 echo "Error : Need the name of the input file."
29 exit 1
30 fi
31
32filename=$1
33
34if [ ! -f $filename ];then
35 echo "Error : Can't find file $filename."
36 exit 1
37 fi
38
39count=`grep fldcw $filename | wc -l`
40
41if [ $count -gt 0 ]; then
42 echo -e "\n\nError : found $count bad instructions.\n\n"
43 exit 1
44 fi
45
46echo "ok"
47
This page took 0.012093 seconds and 4 git commands to generate.