On Sun, Sep 06, 2009 at 11:18:07AM +0100, Edd Barrett wrote:
> Hi,
> 
> On Sat, Sep 5, 2009 at 7:51 PM, Jacob Meuser<jake...@sdf.lonestar.org> wrote:
> 
> > that can be fixed easily.  actually, it's an mplayer bug that this
> > code is being built.  it's for saving/restoring cpu state with altivec,
> > but altivec is disabled.
> 
> OK, progress is good.
> 
> Did someone try --arch=generic for arm? If that works, can we get a
> patch with the PPC/ARM fixes and also sthen's tweaks? Someone want to
> step up, or shall I?

here are patches for libmpeg2/ppc.  untested, as I have no ppc.

in libmpeg2 (upstream version) ARCH_PPC means altivec is usable.
in mplayer ARCH_PPC means any ppc, whether altivec is usable or not.

if it still fails with these patches, then either it needs more
s/ARCH_PPC/HAVE_ALTIVEC/ (note: they are both always defined to either
0 or 1) or s/ARCH_PPC/ARCH_PPC && HAVE_ALTIVEC/.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

$OpenBSD$
--- libmpeg2/cpu_state.c.orig   Sun Sep  6 08:39:16 2009
+++ libmpeg2/cpu_state.c        Sun Sep  6 08:41:23 2009
@@ -43,7 +43,7 @@ static void state_restore_mmx (cpu_state_t * state)
 }
 #endif
 
-#if ARCH_PPC
+#if ARCH_PPC && HAVE_ALTIVEC
 #if defined(__APPLE_CC__)      /* apple */
 #define LI(a,b) "li r" #a "," #b "\n\t"
 #define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
@@ -120,7 +120,7 @@ void mpeg2_cpu_state_init (uint32_t accel)
        mpeg2_cpu_state_restore = state_restore_mmx;
     }
 #endif
-#if ARCH_PPC
+#if ARCH_PPC && HAVE_ALTIVEC
     if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
        mpeg2_cpu_state_save = state_save_altivec;
        mpeg2_cpu_state_restore = state_restore_altivec;
$OpenBSD$
--- libmpeg2/idct_altivec.c.orig        Sun Sep  6 08:45:11 2009
+++ libmpeg2/idct_altivec.c     Sun Sep  6 08:46:35 2009
@@ -23,7 +23,7 @@
 
 #include "config.h"
 
-#if ARCH_PPC
+#if ARCH_PPC && HAVE_ALTIVEC
 
 #ifdef HAVE_ALTIVEC_H
 #include <altivec.h>
$OpenBSD$
--- libmpeg2/motion_comp_altivec.c.orig Sun Sep  6 08:47:00 2009
+++ libmpeg2/motion_comp_altivec.c      Sun Sep  6 08:47:38 2009
@@ -23,7 +23,7 @@
 
 #include "config.h"
 
-#if ARCH_PPC
+#if ARCH_PPC && HAVE_ALTIVEC
 
 #ifdef HAVE_ALTIVEC_H
 #include <altivec.h>

Reply via email to