Thread (10 messages) flat view 10 messages, 3 authors, 2012-01-04

RE: [PATCH] x86: fix and improve cmpxchg_double{,_local}()

From: David Laight <hidden>
Date: 2012-01-04 10:38:23
Also in: lkml

 
BTW atomic64_set() asm() contraints are wrong :

static inline void atomic64_set(atomic64_t *v, long long i)
{
        unsigned high = (unsigned)(i >> 32);
        unsigned low = (unsigned)i;
        asm volatile(ATOMIC64_ALTERNATIVE(set)
                     : "+b" (low), "+c" (high)
                     : "S" (v)
                     : "eax", "edx", "memory"
                     );
}


ebx/ecx registers are not modified by cmpxchg8b (or the 
atomic64_set_386 emulation). Only eax/edx can be modified.
Isn't it also possible to constrain the "memory"
constraint to only apply to '*v' not all of memory?
I can't remember the syntax off hand though...

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help