You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.4KB

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