summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/i386
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>2002-06-24 23:19:18 +0000
committerjdp <jdp@FreeBSD.org>2002-06-24 23:19:18 +0000
commitbe1828addc30ba2c669f5f07acb2529b272fd6db (patch)
tree271d68225fec6c726759bdbf394facb848f26f8e /libexec/rtld-elf/i386
parentfc63b01c8774c47c33fc03d0b9fd17c5f7bec0bf (diff)
downloadFreeBSD-src-be1828addc30ba2c669f5f07acb2529b272fd6db.zip
FreeBSD-src-be1828addc30ba2c669f5f07acb2529b272fd6db.tar.gz
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
Diffstat (limited to 'libexec/rtld-elf/i386')
-rw-r--r--libexec/rtld-elf/i386/lockdflt.c8
-rw-r--r--libexec/rtld-elf/i386/rtld_machdep.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/libexec/rtld-elf/i386/lockdflt.c b/libexec/rtld-elf/i386/lockdflt.c
index c1c23c1..88dd569 100644
--- a/libexec/rtld-elf/i386/lockdflt.c
+++ b/libexec/rtld-elf/i386/lockdflt.c
@@ -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;
}
diff --git a/libexec/rtld-elf/i386/rtld_machdep.h b/libexec/rtld-elf/i386/rtld_machdep.h
index e51194c..1f83411 100644
--- a/libexec/rtld-elf/i386/rtld_machdep.h
+++ b/libexec/rtld-elf/i386/rtld_machdep.h
@@ -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");
}
OpenPOWER on IntegriCloud