Error: Incorrect register `%rcx' used with `l' suffix.
I program the following code and compiling
MLX_ATOM_CAS_RET_T mlxAtomCas(MLX_ATOM_T * v, UINT64 cmp, UINT64 val)
{
UINT64 readval;
char ret;
__asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
: "=q" (ret), "=m" (v->counter), "=a" (readval)
: "r" (val), "m" (v->counter), "a" (cmp) : "memory");
}
When cmp, val, readval are 64bit ,copiler will send the following message
/tmp/ccKo6DJc.s: Assembler messages:
/tmp/ccKo6DJc.s:1391: Error: Incorrect register `%rcx' used with `l' suffix.
If cmp , val,readval are 32bit, it won't.
How to solves this problems?
Thank you very much~
|