我正在使用代码Neonlinpack代码, [http://www.roylongbottom.org.uk/Raspberry_Pi_Benchmarks.zip][1]
当我使用没有任何优化标志的clang编译它时,它运行正常。但是当我在命令中使用O3 / O2标志时,
clang -target armv7a-linux-gnueabihf -mfpu=neon -mfloat-abi=hard linpackneon.c cpuidc.c -O3 -o linpackneon
我收到以下错误
In file included from cpuidc.c:13:
In file included from /usr/include/math.h:426:
/usr/include/bits/mathinline.h:756:25: error: invalid output constraint '=&q' in
asm
: "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), \
^
/usr/include/bits/mathinline.h:756:25: error: invalid output constraint '=&q' in
asm
/usr/include/bits/mathinline.h:756:25: error: invalid output constraint '=&q' in
asm
/usr/include/bits/mathinline.h:774:25: error: invalid output constraint '=&q' in
asm
: "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), \
^
/usr/include/bits/mathinline.h:774:25: error: invalid output constraint '=&q' in
asm
/usr/include/bits/mathinline.h:774:25: error: invalid output constraint '=&q' in
asm
/usr/include/bits/mathinline.h:881:3: error: unknown register name 'st' in asm
__lrint_code;
^
/usr/include/bits/mathinline.h:876:40: note: expanded from macro '__lrint_code'
: "=m" (__lrintres) : "t" (__x) : "st");
这些错误背后的原因是什么?我没有遇到GCC这样的错误。
答案 0 :(得分:1)
所有cpuid.c都是从Linux获取时间/时间和配置细节。根据需要单独编译,不进行优化或注释掉语句。只需要时间数据。