Fix powerpc uatomic 4-byte cmpxchg (cmpd -> cmpw)
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 20 May 2010 22:09:20 +0000 (18:09 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 20 May 2010 22:09:20 +0000 (18:09 -0400)
Necessary to make it work on 32-bit only powerpc architectures. Was using the
64-bit comparison rather than the 32-bit comparison for 4-byte cmpxchg.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu/uatomic_arch_ppc.h

index 4db7007ff991de54088aa39913eeac431c65648a..710ce054e86514093f45024c573fdd3e33f58230 100644 (file)
@@ -106,7 +106,7 @@ unsigned long _uatomic_cmpxchg(void *addr, unsigned long old,
                __asm__ __volatile__(
                        LWSYNC_OPCODE
                "1:\t"  "lwarx %0,0,%1\n"       /* load and reserve */
-                       "cmpd %0,%3\n"          /* if load is not equal to */
+                       "cmpw %0,%3\n"          /* if load is not equal to */
                        "bne 2f\n"              /* old, fail */
                        "stwcx. %2,0,%1\n"      /* else store conditional */
                        "bne- 1b\n"             /* retry if lost reservation */
This page took 0.024969 seconds and 4 git commands to generate.