1
mirror of https://github.com/mpv-player/mpv synced 2024-08-04 14:59:58 +02:00

Improved SPARC CPU detection and SPARC compilation fixes.

patch by jb13@gomerbud.com


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13019 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2004-08-14 15:17:39 +00:00
parent 40a0c7778d
commit f256f4f9b9
4 changed files with 38 additions and 3 deletions

33
configure vendored
View File

@ -449,7 +449,8 @@ if test -z "$_target" ; then
x86_64|amd64) host_arch=x86_64 ;;
macppc|ppc) host_arch=ppc ;;
alpha) host_arch=alpha ;;
sparc*) host_arch=sparc ;;
sparc) host_arch=sparc ;;
sparc64) host_arch=sparc64 ;;
parisc*|hppa*|9000*) host_arch=hppa ;;
arm*) host_arch=arm ;;
s390) host_arch=s390 ;;
@ -885,7 +886,33 @@ EOF
_def_arch='#define ARCH_SPARC 1'
_target_arch='TARGET_ARCH_SPARC = yes'
iproc='sparc'
proc='v8'
if sunos ; then
echocheck "CPU type"
karch=`uname -m`
case "`echo $karch`" in
sun4) proc=v7 ;;
sun4c) proc=v7 ;;
sun4d) proc=v8 ;;
sun4m) proc=v8 ;;
sun4u) proc=v9 _vis='yes' _def_vis='#define HAVE_VIS = yes' ;;
*) ;;
esac
echores "$proc"
else
proc=v8
fi
_march=''
_mcpu="-mcpu=$proc"
_optimizing="$proc"
;;
sparc64)
_def_arch='#define ARCH_SPARC 1'
_target_arch='TARGET_ARCH_SPARC = yes'
_vis='yes'
_def_vis='#define HAVE_VIS = yes'
iproc='sparc'
proc='v9'
_march=''
_mcpu="-mcpu=$proc"
_optimizing="$proc"
@ -6265,6 +6292,7 @@ TARGET_3DNOW = $_3dnow
TARGET_3DNOWEX = $_3dnowex
TARGET_SSE = $_sse
TARGET_ALTIVEC = $_altivec
TARGET_VIS = $_vis
# --- GUI stuff ---
GTKLIB = $_ld_static $_ld_gtk
@ -6820,6 +6848,7 @@ $_def_altivec_h // enables usage of altivec.h
$_def_mlib // Sun mediaLib, available only on solaris
$_def_vis // only define if you have VIS ( ultrasparc )
/* libmpeg2 uses a different feature test macro for mediaLib */
#ifdef HAVE_MLIB

View File

@ -13,6 +13,10 @@ ifeq ($(TARGET_ALTIVEC),yes)
SRCS += motion_comp_altivec.c idct_altivec.c
endif
ifeq ($(TARGET_VIS),yes)
SRCS += motion_comp_vis.c
endif
.SUFFIXES: .c .o
# .PHONY: all clean

View File

@ -108,7 +108,7 @@ static inline uint32_t arch_accel (void)
}
#endif /* ARCH_X86 */
#if defined(ARCH_PPC) || defined(ARCH_SPARC)
#if defined(ARCH_PPC) || (defined(ARCH_SPARC) && defined(HAVE_VIS))
#include <signal.h>
#include <setjmp.h>

View File

@ -55,9 +55,11 @@ void mpeg2_mc_init (uint32_t accel)
else
#endif
#ifdef ARCH_SPARC
#ifdef HAVE_VIS
if (accel & MPEG2_ACCEL_SPARC_VIS)
mpeg2_mc = mpeg2_mc_vis;
else
#endif
#endif
mpeg2_mc = mpeg2_mc_c;
}