From 6ff9c31abc14f207265ab214370982ecb3bfe428 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 25 Mar 2015 23:59:45 +0100 Subject: utmp: favour POSIX utmpx over SVID utmp Note: _PATH_UTMPX == _PATH_UTMP and the utmp struct is identical to the utmpx struct so this only changes the external API entrypoints and NOT the underlying data source. This saves about 500b (~1300b from previously ~1950) while at it. Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/sh/bits/atomic.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libc/sysdeps/linux/sh') diff --git a/libc/sysdeps/linux/sh/bits/atomic.h b/libc/sysdeps/linux/sh/bits/atomic.h index 745c85c1d..18ae9ea77 100644 --- a/libc/sysdeps/linux/sh/bits/atomic.h +++ b/libc/sysdeps/linux/sh/bits/atomic.h @@ -68,6 +68,12 @@ typedef uintmax_t uatomic_max_t; r1: saved stack pointer */ +#if __GNUC_PREREQ (4, 7) +# define rNOSP "u" +#else +# define rNOSP "r" +#endif + /* Avoid having lots of different versions of compare and exchange, by having this one complicated version. Parameters: bwl: b, w or l for 8, 16 and 32 bit versions. @@ -94,7 +100,7 @@ typedef uintmax_t uatomic_max_t; movt %0\n\ .endif\n" \ : "=&r" (__arch_result) \ - : "r" (mem), "r" (newval), "r" (oldval) \ + : rNOSP (mem), rNOSP (newval), rNOSP (oldval) \ : "r0", "r1", "t", "memory"); \ __arch_result; }) @@ -150,7 +156,7 @@ typedef uintmax_t uatomic_max_t; mov." #bwl " %1,@%2\n\ 1: mov r1,r15" \ : "=&r" (old), "=&r"(new) \ - : "r" (mem), "r" (value) \ + : rNOSP (mem), rNOSP (value) \ : "r0", "r1", "memory"); \ }) @@ -194,7 +200,7 @@ typedef uintmax_t uatomic_max_t; mov." #bwl " %0,@%1\n\ 1: mov r1,r15" \ : "=&r" (__new) \ - : "r" (mem), "r" (__value) \ + : rNOSP (mem), rNOSP (__value) \ : "r0", "r1", "memory"); \ __new; \ }) -- cgit v1.2.3