[MPlayer-dev-eng] [PATCH] NetBSD sparc64 and vis

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Aug 26 13:01:38 CEST 2007


Hello,
On Sun, Aug 26, 2007 at 01:34:09PM +0300, Jan Knutar wrote:
[...]
> Attached is a patch that makes configure check the output of sysctl 
> hw.model on netbsd sparc64, and if 'UltraSPARC' is found there, vis is 
> enabled and -mcpu=ultrasparc is set. Vis is disabled if running on 
> non-ultrasparc sparc64.

Do they exist? And isn't there a simpler and especially more portable
way of detecting them? (actually it is stupid enough that the normal
sparc detection only works for sunos).
Either way, could you please first test the simplification that attached
patch does?

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 24206)
+++ configure	(working copy)
@@ -1964,7 +1965,7 @@
 	    sun4c) proc=v7 ;; 
 	    sun4d) proc=v8 ;;
 	    sun4m) proc=v8 ;;
-	    sun4u) proc=ultrasparc _vis='yes' _def_vis='#define HAVE_VIS = yes' ;;
+	    sun4u) proc=ultrasparc _vis='yes' ;;
 	    sun4v) proc=v9 ;;
 	    *) proc=v8 ;;
 	esac
@@ -1981,7 +1982,6 @@
     _arch='SPARC'
     _target_arch='ARCH_SPARC = yes'
     _vis='yes'
-    _def_vis='#define HAVE_VIS = yes'
     iproc='sparc'
     proc='v9'
     _march=''
@@ -2522,7 +2529,7 @@
   echores "$_iwmmxt"
 fi
 
-_cpuexts_all='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV ARMV5TE ARMV6 IWMMXT MLIB MMI SH4 BFIN'
+_cpuexts_all='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV ARMV5TE ARMV6 IWMMXT MLIB MMI SH4 BFIN VIS'
 test "$_altivec"   = yes && _cpuexts="ALTIVEC $_cpuexts"
 test "$_mmx"       = yes && _cpuexts="MMX $_cpuexts"
 test "$_mmxext"    = yes && _cpuexts="MMX2 $_cpuexts"
@@ -2536,6 +2543,7 @@
 test "$_armv5te"   = yes && _cpuexts="ARMV5TE $_cpuexts"
 test "$_armv6"     = yes && _cpuexts="ARMV6 $_cpuexts"
 test "$_iwmmxt"    = yes && _cpuexts="IWMMXT $_cpuexts"
+test "$_vis"       = yes && _cpuexts="VIS $_cpuexts"
 
 # Checking kernel version...
 if x86_32 && linux ; then
@@ -8365,8 +8401,6 @@
 
 $_def_altivec_h	// enables usage of altivec.h
 
-$_def_vis	// only define if you have VIS ( ultrasparc )
-
 /* libmpeg2 uses a different feature test macro for mediaLib */
 #ifdef HAVE_MLIB
 #define LIBMPEG2_MLIB 1


More information about the MPlayer-dev-eng mailing list