summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-12-07 07:42:25 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2015-12-09 07:53:16 +0100
commit1e28bdaabba3cdc26df028d70f9e15e055e75587 (patch)
treee98f237e869d85c30bdbba39f14e0e5460cbffac /libc/sysdeps/linux
parent5dd4d7dc03db1005c850373b3821f69d333ca675 (diff)
sh: add back sh2 specific assembly for clone()
In gcc 5.x there is a compile failure, for sh2 builds as shad no longer is accepted. Strange that it is working for 4.9.x. Add back old assembly code.
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/sh/clone.S16
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/sh/clone.S b/libc/sysdeps/linux/sh/clone.S
index 4374a634e..3ed6b25de 100644
--- a/libc/sysdeps/linux/sh/clone.S
+++ b/libc/sysdeps/linux/sh/clone.S
@@ -53,8 +53,24 @@ ENTRY(__clone)
mov #+SYS_ify(clone), r3
trapa #0x15
mov r0, r1
+#ifdef __sh2__
+/* 12 arithmetic shifts for the sh2, because shad doesn't exist! */
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+ shar r1
+#else
mov #-12, r2
shad r2, r1
+#endif
not r1, r1 // r1=0 means r0 = -1 to -4095
tst r1, r1 // i.e. error in linux
bf .Lclone_end