Commit 14f87098c07c33cc46fb7510be739e63c3a9be07

Authored by malc
1 parent 48253bd8

AIX's assembler does not support local labels, use relative addressing instead

(Laurent Vivier)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5731 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 4 deletions
qemu-lock.h
... ... @@ -63,12 +63,11 @@ static inline int testandset (int *p)
63 63 {
64 64 int ret;
65 65 __asm__ __volatile__ (
66   - "0: lwarx %0,0,%1\n"
  66 + " lwarx %0,0,%1\n"
67 67 " xor. %0,%3,%0\n"
68   - " bne 1f\n"
  68 + " bne $+12\n"
69 69 " stwcx. %2,0,%1\n"
70   - " bne- 0b\n"
71   - "1: "
  70 + " bne- $-16\n"
72 71 : "=&r" (ret)
73 72 : "r" (p), "r" (1), "r" (0)
74 73 : "cr0", "memory");
... ...