summaryrefslogtreecommitdiff
path: root/toolchain/uClibc/patches-0.9.30.1/901-hi_lo_system_calls.patch
blob: 6c78130e3fa8b7624c6ff031f009a76c62321a4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
The kernel does not save these registers across system calls.  GCC 4.4
has gotten more agressive about using them for temporary variables, so
this shows up as intermittent crashes if you use a recent compiler.

Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>

diff --git a/libc/sysdeps/linux/mips/bits/syscalls.h b/libc/sysdeps/linux/mips/bits/syscalls.h
index 3639913..28b0f91 100644
--- a/libc/sysdeps/linux/mips/bits/syscalls.h
+++ b/libc/sysdeps/linux/mips/bits/syscalls.h
@@ -261,7 +261,7 @@
 })
 
 #define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "memory"
+	"$14", "$15", "$24", "$25", "hi", "lo", "memory"
 
 #else /* N32 || N64 */
 
@@ -318,7 +318,7 @@
 })
 
 #define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "memory"
+	"$14", "$15", "$24", "$25", "hi", "lo", "memory"
 
 #endif
 

--