| 1 | The kernel does not save these registers across system calls. GCC 4.4 |
| 2 | has gotten more agressive about using them for temporary variables, so |
| 3 | this shows up as intermittent crashes if you use a recent compiler. |
| 4 | |
| 5 | Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com> |
| 6 | |
| 7 | diff --git a/libc/sysdeps/linux/mips/bits/syscalls.h b/libc/sysdeps/linux/mips/bits/syscalls.h |
| 8 | index 3639913..28b0f91 100644 |
| 9 | --- a/libc/sysdeps/linux/mips/bits/syscalls.h |
| 10 | +++ b/libc/sysdeps/linux/mips/bits/syscalls.h |
| 11 | @@ -261,7 +261,7 @@ |
| 12 | }) |
| 13 | |
| 14 | #define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \ |
| 15 | - "$14", "$15", "$24", "$25", "memory" |
| 16 | + "$14", "$15", "$24", "$25", "hi", "lo", "memory" |
| 17 | |
| 18 | #else /* N32 || N64 */ |
| 19 | |
| 20 | @@ -318,7 +318,7 @@ |
| 21 | }) |
| 22 | |
| 23 | #define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ |
| 24 | - "$14", "$15", "$24", "$25", "memory" |
| 25 | + "$14", "$15", "$24", "$25", "hi", "lo", "memory" |
| 26 | |
| 27 | #endif |
| 28 | |
| 29 | |
| 30 | -- |
| 31 | |