This web mail archive is frozen.
This page is part of a frozen web archive of this mailing list.
You can still navigate around this archive, but know that no new mails
have been added to it since July of 2016.
Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.
On Feb 10, 2010, at 7:47 AM, Ake Sandgren wrote:
> According to people who knows asm statements fairly well (compiler
> developers), it should be
> static inline int opal_atomic_cmpset_32( volatile int32_t *addr,
> int32_t oldval, int32_t newval)
> unsigned char ret;
> __asm__ __volatile__ (
> SMPLOCK "cmpxchgl %3,%2 \n\t"
> "sete %0 \n\t"
> : "=qm" (ret), "=a" (oldval), "=m" (*addr)
> : "q"(newval), "2"(*addr), "1"(oldval)
> : "memory", "cc");
> return (int)ret;
Disclaimer: I know almost nothing about assembly.
I know that OMPI's asm is a carefully crafted set of assembly that works across a broad range of compilers. So what might not be "quite right" for one compiler may actually be there because another compiler needs it.
That being said, if the changes above are for correctness, not neatness/style/etc., I can't speak for that...
For corporate legal information go to: