[MPlayer-dev-eng] Code to determine processor for IRIX

Henry R. Bent hbent at cs.oberlin.edu
Thu Nov 6 11:33:29 CET 2003


Hi mplayer folks,

Here's a quick little bit of code I whipped up for the configure script
to determine the CPU type on an IRIX machine and set flags accordingly.
Note that since GCC can't handle the R10K and later, they must be
scheduled as an R8K.  Also, I assume anyone who matches the "R2000A/R3000"
string will be using an R3000, as you'd be just plain loony to use mplayer
on an R2K.

My only reservation is whether or not this code will fail on RM7000
processors, as I don't know what string hinv will print for them.  RM5200s
should be OK since IRIX just reports them as an R5000.

Please cc replies to me, as I am not subscribed to the list.  Thanks!

--

    echocheck "CPU type"
    proc=`hinv -c processor | grep CPU | cut -d " " -f3`
    case "`echo $proc`" in
      R2000A/R3000) _march='-mips1' _mcpu='-mtune=r3000' ;;
      R4000) _march='-mips3' _mcpu='-mtune=r4000' ;;
      R4400) _march='-mips3' _mcpu='-mtune=r4400' ;;
      R4600) _march='-mips3' _mcpu='-mtune=r4600' ;;
      R5000) _march='-mips4' _mcpu='-mtune=r5000' ;;
      R8000) _march='-mips4' _mcpu='-mtune=r8000' ;;
      R10000) _march='-mips4' _mcpu='-mtune=r8000' ;;
      R12000) _march='-mips4' _mcpu='-mtune=r8000' ;;
      R14000) _march='-mips4' _mcpu='-mtune=r8000' ;;
      R16000) _march='-mips4' _mcpu='-mtune=r8000' ;;
    esac
    echores "$proc"

--
Henry Bent
hbent at cs.oberlin.edu




More information about the MPlayer-dev-eng mailing list