On 2011-12-14 12:38:59 -0800, Bryan Galusha wrote:
> Having an issue compiling libav for the ARM cortex-a8.
> The compiler is choking on the R and Q operand codes that appear in both
> intmath.h and intreadwrite.h, which it errors out on saying the Q and R
> operand codes are "invalid operand"
> 
> Here is the error in intmath.h:
> error: invalid operand in inline asm: 'adds   $1, ${1:Q}, ${2:Q}, lsr #31
>     itet   ne
>     mvnne  $1, #1<<31
>     moveq  $0, ${1:Q}
>     eorne  $0, $1,  ${1:Q}, asr #31
>     '
> Which corresponds to this function from intmath.h
> #define av_clipl_int32 av_clipl_int32_arm
> static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a)
> {
>     int x, y;
>     __asm__ ("adds   %1, %R2, %Q2, lsr #31  \n\t"
>              "itet   ne                     \n\t"
>              "mvnne  %1, #1<<31             \n\t"
>              "moveq  %0, %Q2                \n\t"
>              "eorne  %0, %1,  %R2, asr #31  \n\t"
>              : "=r"(x), "=&r"(y) : "r"(a));
>     return x;
> }
> 
> Removing the R and Q operand codes makes the compiler happy, but obviously
> the code won't function correctly

as first workaround just wrap a '#if 0', '#endif' around the functions.
There a pure C implemtations which will be used then.
 
> Any help with this issue would be greatly appreciated, version and
> ./configure information below,
> Bryan
> 
> 
> i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build
> 5658) (LLVM build 2336.1.00)
> 
> ./configure --enable-cross-compile --arch=arm --target-os=darwin
> --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch
> armv7 -miphoneos-version-min=5.0'
> --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
> --cpu=cortex-a8 --enable-pic \
> 
> --extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system
> \
>     --extra-cflags='-march=armv7-a -mfloat-abi=softfp' \
>     --enable-pic --disable-doc \
> --disable-encoders --disable-decoders --disable-hwaccels \
> --disable-muxers --disable-demuxers --disable-parsers --disable-bsfs \
> --disable-protocols --disable-indevs --disable-outdevs --disable-devices \
> --disable-filters --disable-network --disable-zlib --disable-bzlib \

there is --disable-everything as shortcut for most of your options

> --disable-armvfp --disable-neon \

is there any specific reason to disable vfp and neon? As far as I know
vfp and neon are supported by all cortex-a8+ CPUs used by apple.

Janne
_______________________________________________
libav-tools mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-tools

Reply via email to