Jelajahi Sumber

mips: do not save variables in "hi" or "lo" across system calls

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@codesourcery.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Daniel Jacobowitz 14 tahun lalu
induk
melakukan
18cc8e0e45
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      libc/sysdeps/linux/mips/bits/syscalls.h

+ 2 - 2
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