summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh/bits
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-03-29 04:50:56 -0500
committerWaldemar Brodkorb <wbx@openadk.org>2015-03-29 04:50:56 -0500
commitcd5f92704e1e17bbc0c15d197f3bc236c7dc9bf2 (patch)
tree1400302b543e4528aedea5d72731983559cfcf36 /libc/sysdeps/linux/sh/bits
parentad2bffbf1926051ef333f9899344f6bddf2c03cf (diff)
parent24946289317ea23bb0d1814cca0a499a905f7d6f (diff)
merge uClibc git master
Diffstat (limited to 'libc/sysdeps/linux/sh/bits')
-rw-r--r--libc/sysdeps/linux/sh/bits/atomic.h12
-rw-r--r--libc/sysdeps/linux/sh/bits/syscalls.h2
2 files changed, 10 insertions, 4 deletions
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; \
})
diff --git a/libc/sysdeps/linux/sh/bits/syscalls.h b/libc/sysdeps/linux/sh/bits/syscalls.h
index b308276c5..efd423ed3 100644
--- a/libc/sysdeps/linux/sh/bits/syscalls.h
+++ b/libc/sysdeps/linux/sh/bits/syscalls.h
@@ -122,7 +122,7 @@
__asm__ __volatile__ (SYSCALL_INST_STR##nr SYSCALL_INST_PAD \
: "=z" (resultvar) \
: "r" (r3) ASMFMT_##nr \
- : "memory" \
+ : "memory", "t" \
); \
(int) resultvar; \
}) \