Update the asm statements to use the "+" modifier instead of
matching constraints where appropriate. This makes the dynamic linker buildable at -O0 again. Thanks to Bruce Evans for identifying the cause of the build problem. MFC after: 1 week
This commit is contained in:
parent
fc63b01c87
commit
be1828addc
@ -80,8 +80,8 @@ cmpxchgl(int old, int new, volatile int *m)
|
||||
int result;
|
||||
|
||||
__asm __volatile ("lock; cmpxchgl %2, %0"
|
||||
: "=m"(*m), "=a"(result)
|
||||
: "r"(new), "0"(*m), "1"(old)
|
||||
: "+m"(*m), "=a"(result)
|
||||
: "r"(new), "1"(old)
|
||||
: "cc");
|
||||
|
||||
return result;
|
||||
@ -93,8 +93,8 @@ xchgl(int v, volatile int *m)
|
||||
int result;
|
||||
|
||||
__asm __volatile ("xchgl %0, %1"
|
||||
: "=r"(result), "=m"(*m)
|
||||
: "0"(v), "1"(*m));
|
||||
: "=r"(result), "+m"(*m)
|
||||
: "0"(v));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -55,21 +55,21 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target,
|
||||
static inline void
|
||||
atomic_decr_int(volatile int *p)
|
||||
{
|
||||
__asm __volatile ("lock; decl %0" : "=m"(*p) : "0"(*p) : "cc");
|
||||
__asm __volatile ("lock; decl %0" : "+m"(*p) : : "cc");
|
||||
}
|
||||
|
||||
static inline void
|
||||
atomic_incr_int(volatile int *p)
|
||||
{
|
||||
__asm __volatile ("lock; incl %0" : "=m"(*p) : "0"(*p) : "cc");
|
||||
__asm __volatile ("lock; incl %0" : "+m"(*p) : : "cc");
|
||||
}
|
||||
|
||||
static inline void
|
||||
atomic_add_int(volatile int *p, int val)
|
||||
{
|
||||
__asm __volatile ("lock; addl %1, %0"
|
||||
: "=m"(*p)
|
||||
: "ri"(val), "0"(*p)
|
||||
: "+m"(*p)
|
||||
: "ri"(val)
|
||||
: "cc");
|
||||
}
|
||||
|
||||
|
@ -80,8 +80,8 @@ cmpxchgl(int old, int new, volatile int *m)
|
||||
int result;
|
||||
|
||||
__asm __volatile ("lock; cmpxchgl %2, %0"
|
||||
: "=m"(*m), "=a"(result)
|
||||
: "r"(new), "0"(*m), "1"(old)
|
||||
: "+m"(*m), "=a"(result)
|
||||
: "r"(new), "1"(old)
|
||||
: "cc");
|
||||
|
||||
return result;
|
||||
@ -93,8 +93,8 @@ xchgl(int v, volatile int *m)
|
||||
int result;
|
||||
|
||||
__asm __volatile ("xchgl %0, %1"
|
||||
: "=r"(result), "=m"(*m)
|
||||
: "0"(v), "1"(*m));
|
||||
: "=r"(result), "+m"(*m)
|
||||
: "0"(v));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -55,21 +55,21 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target,
|
||||
static inline void
|
||||
atomic_decr_int(volatile int *p)
|
||||
{
|
||||
__asm __volatile ("lock; decl %0" : "=m"(*p) : "0"(*p) : "cc");
|
||||
__asm __volatile ("lock; decl %0" : "+m"(*p) : : "cc");
|
||||
}
|
||||
|
||||
static inline void
|
||||
atomic_incr_int(volatile int *p)
|
||||
{
|
||||
__asm __volatile ("lock; incl %0" : "=m"(*p) : "0"(*p) : "cc");
|
||||
__asm __volatile ("lock; incl %0" : "+m"(*p) : : "cc");
|
||||
}
|
||||
|
||||
static inline void
|
||||
atomic_add_int(volatile int *p, int val)
|
||||
{
|
||||
__asm __volatile ("lock; addl %1, %0"
|
||||
: "=m"(*p)
|
||||
: "ri"(val), "0"(*p)
|
||||
: "+m"(*p)
|
||||
: "ri"(val)
|
||||
: "cc");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user