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

GNUtoo at no-log.org GNUtoo at no-log.org
Thu Nov 6 23:59:53 CET 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).
I looked at the configure file of mplayer trunk and there is the following
inside:
if arm ; then
  echocheck "ARM pld instruction"
  cat > $TMPC << EOF
int main(void) { __asm__ volatile ("pld [r0]"); return 0; }
EOF
  pld=no
  cc_check && pld=yes
  echores "$pld"
so if I add the following to the beginning of the assembly file would it
work?
#ifndef HAVE_PLD
.macro pld reg
.endm
#endif
More precisely is the checks in the configure script enough or should I
also add that in the configure script:
enabled armv4l  && check_asm pld     '"pld [r0]"'



More information about the MPlayer-dev-eng mailing list