../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:131: Error: no such instruction: `swpb %cl,%dl,[%edi]'
可能是arm 交叉环境有问题,如果配置好了一般reconfigure下就ok.
如果总是有问题,可以修改qatomic_arm.h,将汇编用c code写可以避过这个错误。
inline char q_atomic_swp(volatile char *ptr, char newval)
{
register char ret;
/*asm volatile("swpb %0,%2,[%3]"
: "=&r"(ret), "=m" (*ptr)
: "r"(newval), "r"(ptr)
: "cc", "memory");*/
ret=*ptr;
*ptr=newval;
return ret;
}
template
Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndStoreOrdered(T *newValue)
{
T *originalValue;
/*asm volatile("swp %0,%2,[%3]"
: "=&r"(originalValue), "=m" (_q_value)
: "r"(newValue), "r"(&_q_value)
: "cc", "memory");*/
originalValue=_q_value;
_q_value=newValue;
return originalValue;
}
阅读(3357) | 评论(0) | 转发(0) |