DNSPod/dnspod-sr

使用gcc在arm5te cpu上编译的错误

fw867 opened this issue · 1 comments

其它模块都编译通过只有下面这个不行,出错
[/tmp/make/src] # make
gcc -g -Wall -c -o memory.o memory.c
memory.c: In function 'rte_atomic32_cmpset':
memory.c:90: error: impossible constraint in 'asm'
make: *** [memory.o] Error 1

问题出在:
asm volatile(
"lock ; "
"cmpxchgl %[src], %[dst];"
"sete %[res];"
: [res] "=a" (res), /* output _/
[dst] "=m" (_dst)
: [src] "r" (src), /* input _/
"a" (exp),
"m" (_dst)
: "memory"); /* no-clobber list */
return res;

请问要怎么修改?

原子操作在每个平台上都不相同,目前只支持x86的linux平台,像ARM/HPUNIX/MIPS(龙芯Loongson)/win32等暂不支持。