Re: cmpxchgl on x86?
Re: cmpxchgl on x86?
- Subject: Re: cmpxchgl on x86?
- From: Stan Shebs <email@hidden>
- Date: Thu, 23 Jun 2005 12:34:34 -0700
Andrew Gallatin wrote:
I'm trying to compile a unix command-line program on Darwin 8.0 x86,
and I'm hitting this problem:
/var/tmp/cczbJSUe.s:1993:Can't relocate expression. Absolute 0 assumed.
/var/tmp/cczbJSUe.s:1993:operands given don't match any known 386 instruction
The code in it is complaining about is an inline cmpxchgl asm routine:
static inline uint32_t my__cmpswap_u32(uint32_t *ptr, uint32_t old, uint32_t new)
{
asm volatile("lock cmpxchgl %1,%2" : "=a" (old) : "q" (new), "m" (*ptr),"0" (old) : "memory");
return old;
}
This seems to happen with both gcc-4.0 and gcc-3.3
Can somebody tell me what I'm doing wrong, please?
Our assembler doesn't accept "lock" as a valid prefix byte.
This came up at a WWDC lab too; adding newline is a workaround,
but it's reasonable to expect that the assembler does what
everybody else's assembler can do, so please file a bug also.
Stan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden