[vlc-devel] commit: contrib: turn off Thumb ISA for libavcodec and libmad ( Rémi Denis-Courmont )

Måns Rullgård mans at mansr.com
Tue Sep 1 21:23:08 CEST 2009

"Rémi Denis-Courmont" <remi at remlab.net> writes:

> Le samedi 29 août 2009 23:19:51 Måns Rullgård, vous avez écrit :
>> > A solution would be to build the files containing inline ARM asm with
>> > -mno-thumb -mthumb-interwork but you'd have to check every file
>> >
>> > Last but not least: thumb is quite limited and considered slower than
>> > ARM code (note thumb-2 appears to be generally faster than thumb) so
>> > it's not advised for multimedia routines especially when you have loads
>> > of memory available and code size doesn't matter that much.
>> http://hardwarebug.org/2009/03/25/thumbs-up/
> A few compile+SFTP cycles later, it turns out that:
> * VLC with Thumb, and avcodec with interwork fires SIGILL.
> -> It works fine with everything built as ARM
>    (and no interworking of course).

You're probably hitting Cortex-A8 erratum 657417, which can cause
random crashes in Thumb mode.  It can be worked around by the
compiler/linker, though I don't remember whether any gcc version has
this capability.  CodeSourcery 2007q3 certainly doesn't, since this
bug was discovered in early 2009.  Recent releases of ARM RVCT do have
the workaround.

You can check if this is the problem by forcing single-issue.  You
will need to mess with u-boot to do this though.  Let me know if you
want help with that.

> * FFMPEG triggers a segmentation fault when NEON FPU is enabled.
> -> FFMPEG with "default" FPU and VLC with NEON FPU works
>    (but surely not so fast).
> This smells a lot like a bug in avcodec (or gcc).

FFmpeg is thoroughly tested on Cortex-A8 with multiple compiler
versions.  Can you explain more in detail what you did when it failed?

> This is all built with CodeSourcery 2007q3 ARMv7 toolchain (GCC 4.2.1).

Did you force any non-default compiler flags?

Måns Rullgård
mans at mansr.com

More information about the vlc-devel mailing list