mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-23 21:22:48 +02:00
[toolchain] Do not save variables in hi or lo across system calls, fixes issues with gcc-4.4 (#5351)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17742 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
607f1b1b96
commit
2d0f2c9a88
@ -0,0 +1,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
|
||||
|
||||
|
||||
--
|
Loading…
Reference in New Issue
Block a user