[MPlayer-dev-eng] [PATCH] correct illegal instruction on < armv5tE

Siarhei Siamashka siarhei.siamashka at gmail.com
Sun Oct 12 21:17:22 CEST 2008


On Sunday 12 October 2008, GNUtoo at no-log.org wrote:
> > Hi,
> >
> > On Wednesday 08 October 2008 01:01, GNUtoo at no-log.org wrote:
> >> hello, I wanted to cross-compile mplayer from svn but it
> >> failed...that's because the pld instruction is not supported by
> >> my platform(armv4): More precisely the pld instruction was
> >> introduced in armv5tE variants( but is not present on armv5texp)
> >
> > [...]
> >
> >> I bet the patch won't be accepted as-is because it has a
> >> performance cost on the platform where the pld instruction is
> >> supported because the pld instruction preloads things...
> >
> > Then just use
> > #ifdef HAVE_ARMV5TE
> > #endif /* HAVE_ARMV5TE */
> > closure around this instruction.
> >
> > Best regards,
> > Andrew
>
> thanks a lot...here's the updated patch...it took a long time because I
> don't have much time theses days

Hmm, ifdefs around every instruction look extremely ugly. In addition, they
have exactly the same effect as just removing all PLD instructions even for
ARM cores that support cache prefetch (HAVE_ARMV5TE is never defined when
compiling this assembly file).

Have you tried looking into configure script from ffmpeg
and 'libavcodec/armv4l/dsputil_arm_s.S' to see how this can 
be done better?

> I tested it and it compiles and runs(youtube works)

Youtube videos have nothing to do with libmpeg2. If you want to test your
changes, you need to get some mpeg1 or mpeg2 sample files (or convert some
videos to mpeg1/mpeg2 with mencoder).

By the way, libmpeg2 may be slower than ffmpeg so you might want to benchmark
ffmpeg vs. libmpeg2 on your device. If libmpeg2 is slower there, just
compiling mplayer without libmpeg2 support is a good idea.


Also I wonder about your target device. Is it more or less common hardware or
just some kind of exotic development board? I'm asking because this armv4
unfriendly code has been used in mplayer for ages and nobody cared until now.
It makes me think that the number of mplayer users having armv4 hardware is
close to zero. This fact of course does not encourage working on any armv4
fixes or improvements.

But if armv4 is still alive, I would be glad to work on improving it a bit, or
at least fixing all the known issues. And patches are surely welcome.

-- 
Best regards,
Siarhei Siamashka



More information about the MPlayer-dev-eng mailing list