diff options
author | jdp <jdp@FreeBSD.org> | 2002-06-24 23:19:18 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 2002-06-24 23:19:18 +0000 |
commit | be1828addc30ba2c669f5f07acb2529b272fd6db (patch) | |
tree | 271d68225fec6c726759bdbf394facb848f26f8e /libexec | |
parent | fc63b01c8774c47c33fc03d0b9fd17c5f7bec0bf (diff) | |
download | FreeBSD-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')
-rw-r--r-- | libexec/rtld-elf/amd64/lockdflt.c | 8 | ||||
-rw-r--r-- | libexec/rtld-elf/amd64/rtld_machdep.h | 8 | ||||
-rw-r--r-- | libexec/rtld-elf/i386/lockdflt.c | 8 | ||||
-rw-r--r-- | libexec/rtld-elf/i386/rtld_machdep.h | 8 |
4 files changed, 16 insertions, 16 deletions
diff --git a/libexec/rtld-elf/amd64/lockdflt.c b/libexec/rtld-elf/amd64/lockdflt.c index c1c23c1..88dd569 100644 --- a/libexec/rtld-elf/amd64/lockdflt.c +++ b/libexec/rtld-elf/amd64/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/amd64/rtld_machdep.h b/libexec/rtld-elf/amd64/rtld_machdep.h index e51194c..1f83411 100644 --- a/libexec/rtld-elf/amd64/rtld_machdep.h +++ b/libexec/rtld-elf/amd64/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"); } 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"); } |