Anton Blanchard b2c0ab17ba [PATCH] ppc64: speedup cmpxchg
cmpxchg has the following code:

__typeof__(*(ptr)) _o_ = (o);
__typeof__(*(ptr)) _n_ = (n);

Unfortunately it makes gcc 4.0 store and load the variables to the stack.
Eg in atomic_dec_and_test we get:

  stw     r10,112(r1)
  stw     r9,116(r1)
  lwz     r9,112(r1)
  lwz     r0,116(r1)

x86 is just casting the values so do that instead. Also change __xchg*
and __cmpxchg* to take unsigned values, removing a few sign extensions.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-09-06 16:07:53 +10:00
..
2005-09-05 00:05:38 -07:00
2005-09-05 00:05:39 -07:00
2005-08-30 13:40:02 +10:00
2005-08-30 13:38:19 +10:00
2005-08-29 10:53:31 +10:00
2005-09-06 16:07:53 +10:00
2005-08-01 21:38:01 -07:00
2005-09-05 00:05:48 -07:00
2005-07-30 10:14:46 -07:00
2005-08-04 13:00:55 -07:00