lkml.org 
[lkml]   [2012]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCH] x86: fix and improve cmpxchg_double{,_local}()
Date
From

> 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




\
 
 \ /
  Last update: 2012-01-04 11:41    [W:0.097 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site