spinlock: fix build with clang
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 24 Jan 2014 15:29:06 +0000 (16:29 +0100)
committerDavid Marchand <david.marchand@6wind.com>
Wed, 26 Feb 2014 10:01:14 +0000 (11:01 +0100)
LLVM clang requires an explicitly sized "cmp" assembly instruction.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_eal/common/include/rte_spinlock.h

index 85d533a..f79e424 100644 (file)
@@ -98,7 +98,7 @@ rte_spinlock_lock(rte_spinlock_t *sl)
                        "jz 3f\n"
                        "2:\n"
                        "pause\n"
-                       "cmp $0, %[locked]\n"
+                       "cmpl $0, %[locked]\n"
                        "jnz 2b\n"
                        "jmp 1b\n"
                        "3:\n"