[git commit 0_9_30] mips: do not save variables in "hi" or "lo" across system calls

Daniel Jacobowitz dan at codesourcery.com
Sat Oct 10 16:44:02 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=9304be6446f4a62ba57cb219aeec97cdc0f98b5f
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0_9_30

The kernel does not save these registers across system calls.  GCC 4.4
has gotten more aggressive 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 at codesourcery.com>
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/sysdeps/linux/mips/bits/syscalls.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libc/sysdeps/linux/mips/bits/syscalls.h b/libc/sysdeps/linux/mips/bits/syscalls.h
index fa8b876..2a60bd6 100644
--- a/libc/sysdeps/linux/mips/bits/syscalls.h
+++ b/libc/sysdeps/linux/mips/bits/syscalls.h
@@ -328,7 +328,7 @@ return (type) (INLINE_SYSCALL(name, 7, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
 })
 
 #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 */
 
@@ -385,7 +385,7 @@ return (type) (INLINE_SYSCALL(name, 7, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
 })
 
 #define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "memory"
+	"$14", "$15", "$24", "$25", "hi", "lo", "memory"
 
 #endif
 
-- 
1.6.3.3



More information about the uClibc-cvs mailing list