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

Mike Frysinger vapier at gentoo.org
Sat Sep 26 11:48:10 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=18cc8e0e459edf5391016ef76a4ff3108981d86a
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

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>
---
 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 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
 
-- 
1.6.3.3



More information about the uClibc-cvs mailing list