如何试图签GCC霓虹灯指令时不好解决`指令Q0 vadd.i16,Q0,Q0“ [英] How to solve bad instruction `vadd.i16 q0,q0,q0' when attempting to check gcc for neon instruction

查看:230
本文介绍了如何试图签GCC霓虹灯指令时不好解决`指令Q0 vadd.i16,Q0,Q0“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Checking  gcc supports failed for neon instruction vadd.i16 q0,q0,q0
    test.c

    int main ()
    {
     __asm__("vadd.i16 q0, q0, q0"); return 0;
    }

    arm-linux-androideabi-gcc test.c
    /tmp/ccfc8m0G.s: Assembler messages:
    /tmp/ccfc8m0G.s:24: Error: bad instruction `vadd.i16 q0,q0,q0'

与标志试过-mcpu = Cortex-A8的-mfpu =霓虹灯,但还是老样子没有成功

Tried with flags -mcpu=cortex-a8 -mfpu=neon but stil no success

以上code被用来测试霓虹灯指令GCC支持。

Above code was used to test gcc support for neon instruction.

其实我试图建立与ARM platformAfter运行配置脚本NEON支持X264
X264配置日志文件包含

Actually i am trying to build x264 with NEON support for ARM platformAfter running configure script x264 config log file contains

命令行选项:--cross- preFIX =臂Linux的androideabi---enable-PIC,--extra- CFLAGS = -mcpu = Cortex-A8的主机=手臂Linux的

Command line options: "--cross-prefix=arm-linux-androideabi-" "--enable-pic" "--extra- cflags=-mcpu=cortex-a8" "--host=arm-linux"

checking whether arm-linux-androideabi-gcc works... yes
checking whether arm-linux-androideabi-gcc supports for( int i = 0; i < 9; i++ ); with -std=gnu99... yes
checking whether arm-linux-androideabi-gcc supports __asm__("rev ip, ip");... yes
checking whether arm-linux-androideabi-gcc supports __asm__("movt r0, #0");... yes
checking whether arm-linux-androideabi-gcc supports __asm__("vadd.i16 q0, q0, q0");... no

arm-linux-androideabi-gcc conftest.c  -Wall -I. -I$(SRCPATH) -mcpu=cortex-a8 -std=gnu99    -lm -o conftest
E:\cygwin\tmp\ccVtVI1i.s: Assembler messages:
E:\cygwin\tmp\ccVtVI1i.s:24: Error: bad instruction `vadd.i16 q0,q0,q0'
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main () { __asm__("vadd.i16 q0, q0, q0"); return 0; }
--------------------------------------------------


config.h contains

#define HAVE_MALLOC_H 1
#define HAVE_ARMV6 1
#define HAVE_ARMV6T2 1
#define ARCH_ARM 1
#define SYS_LINUX 1
#define HAVE_VECTOREXT 1
#define fseek fseeko
#define ftell ftello
#define HAVE_GPL 1
#define HAVE_INTERLACED 1
#define HAVE_ALTIVEC 0
#define HAVE_ALTIVEC_H 0
#define HAVE_MMX 0
#define HAVE_NEON 0
#define HAVE_BEOSTHREAD 0
#define HAVE_POSIXTHREAD 0
#define HAVE_WIN32THREAD 0
#define HAVE_THREAD 0
#define HAVE_LOG2F 0
#define HAVE_VISUALIZE 0
#define HAVE_SWSCALE 0
#define HAVE_LAVF 0
#define HAVE_FFMS 0
#define HAVE_GPAC 0
#define HAVE_GF_MALLOC 0
#define HAVE_AVS 0
#define HAVE_CPU_COUNT 0


Running make command build x264 static lib  based on above config.h which contains HAVE_NEON 0


**Compiler Version**



arm-linux-androideabi-gcc -v
Using built-in specs.
Target: arm-linux-androideabi
Configured with: /tmp/ndk-digit/src/build/../gcc/gcc-4.4.3/configure --prefix=/usr/local/google/digit/repo/opensource/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows --target=arm-linux-androideabi --host=i586-mingw32msvc --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/tmp/ndk-digit/build/toolchain/temp-install --with-mpfr=/tmp/ndk-digit/build/toolchain/temp-install --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable
-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --enable-initfini-array --disable-nls --prefix=/usr/local/google/digit/repo/opensource/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows --with-sysroot=/usr/local/google/digit/repo/opensource/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/sysroot --with-binutils-version=2.20.1 --with-mpfr-version=2.4.1 --with
-gmp-version=4.2.4 --with-gcc-version=4.4.3 --with-gdb-version=6.6 --with-arch=armv5te --program-transform-name='s,^,arm-linux-androideabi-,'
Thread model: posix
gcc version 4.4.3 (GCC)    

目标是利用霓虹灯启用ARM处理器,以提高X264 EN codeR性能...

Goal is to utilize neon enabled ARM processor to boost x264 encoder performance...

推荐答案

有关它的价值该指令工作正常,我用gcc 4.5.1(codeSourcery)。

For what it's worth this instruction works fine for me with gcc 4.5.1 (CodeSourcery).

请尝试使用这些开关:

-mfpu=neon
-mfloat-abi=softfp
-mcpu=cortex-a8
-march=armv7-a
-mthumb

这篇关于如何试图签GCC霓虹灯指令时不好解决`指令Q0 vadd.i16,Q0,Q0“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆