Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH 1/2] FRV: Implement atomic64_t | Date | Thu, 02 Jul 2009 00:48:38 +0100 |
| |
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > +#define atomic64_read(v) ((v)->counter) > > +#define atomic64_set(v, i) (((v)->counter) = (i))
This is now:
static inline long long atomic64_read(atomic64_t *v) { long long counter;
asm("ldd%I1 %M1,%0" : "=e"(counter) : "m"(v->counter)); return counter; }
static inline void atomic64_set(atomic64_t *v, long long i) { asm volatile("std%I0 %1,%M0" : "=m"(v->counter) : "e"(i)); }
which causes the CPU to do 64-bit loads and stores to register pairs.
David
| |