g ++ 4.9.1로 NEON 데이터 유형으로 일부 코드를 크로스 컴파일하려고하지만 컴파일러가 계속 충돌합니다. 이 유형의 연산이 허용되지 않습니까? 아니면이 문제가 컴파일러 문제입니까? 제 OS는 우분투 12.04이고, 나는 "GCC 버전 4.9.1 (우분투/리나 4.9.1-10ubuntu2)"ARM NEON 데이터 유형으로 컴파일러가 작동하지 않습니다.
파일 이름 팔-GCC를 사용하고 있습니다 : crash.cpp
#include <arm_neon.h>
void crash(
const unsigned short * in,
unsigned short * out,
const int shift)
{
for(int x=0; x<200; x+=8) {
const uint16x8_t inValue = vld1q_u16(&in[x]);
const uint16x8_t normalizedValue = inValue >> shift;
vst1q_u16(&out[x], normalizedValue);
}
}
컴파일 옵션 :
arm-linux-gnueabihf-g++-4.9 -mfpu=neon-vfpv4 -c crash.cpp -o crash.o
출력 :
crash.cpp: In function ‘void crash(const short unsigned int*, short unsigned int*, int)’:
crash.cpp:11:51: internal compiler error: in copy_to_mode_reg, at explow.c:654
const uint16x8_t normalizedValue = inValue >> shift;
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccfz4aZr.out file, please attach this to your bugreport.
내가 바꿀 경우이 코드는 잘 컴파일 "서명되지 않은 INT"를 "uint16x8_과 함께"서명되지 않은 짧은 " t "에는"uint32x4_t ","_u16 "접미사에는"_u32 "접미어가 붙습니다.
GCC는 내장 유형에 대해 자동으로 과부하 된 연산자를 제공합니까? 나는 명시 적 intrisics (이 경우에는'vshl')로 모든 것을해야한다고 생각했을 것입니다. – Notlikethat
automagic 시프트는 일반 int로 작동하지만 16 비트 short int와 충돌합니다. – Pete
GCC에서 버그 리포트를 만들었습니까? – auselen