Index: lss/linux_syscall_support.h |
=================================================================== |
--- lss/linux_syscall_support.h (revision 30) |
+++ lss/linux_syscall_support.h (working copy) |
@@ -2371,7 +2371,7 @@ |
* return -EINVAL; |
*/ |
#ifdef __thumb2__ |
- "push {r7}\n" |
+ "push {r7}\n" |
#endif |
"cmp %2,#0\n" |
"it ne\n" |
@@ -2429,7 +2429,7 @@ |
"swi 0x0\n" |
"1:\n" |
#ifdef __thumb2__ |
- "pop {r7}" |
+ "pop {r7}" |
#endif |
: "=r" (__res) |
: "i"(-EINVAL), |
@@ -2437,7 +2437,7 @@ |
"r"(__ptid), "r"(__tls), "r"(__ctid), |
"i"(__NR_clone), "i"(__NR_exit) |
#ifdef __thumb2__ |
- : "cc", "lr", "memory"); |
+ : "cc", "lr", "memory"); |
#else |
: "cc", "r7", "lr", "memory"); |
#endif |
@@ -2566,14 +2566,22 @@ |
#define LSS_REG(r,a) register unsigned long __r##r __asm__("$"#r) = \ |
(unsigned long)(a) |
#undef LSS_BODY |
+ #undef LSS_SYSCALL_CLOBBERS |
+ #if _MIPS_SIM == _MIPS_SIM_ABI32 |
+ #define LSS_SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", \ |
+ "$11", "$12", "$13", "$14", "$15", \ |
+ "$24", "$25", "hi", "lo", "memory" |
+ #else |
+ #define LSS_SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", \ |
+ "$13", "$14", "$15", "$24", "$25", \ |
+ "hi", "lo", "memory" |
+ #endif |
#define LSS_BODY(type,name,r7,...) \ |
register unsigned long __v0 __asm__("$2") = __NR_##name; \ |
__asm__ __volatile__ ("syscall\n" \ |
: "+r"(__v0), r7 (__r7) \ |
: "0"(__v0), ##__VA_ARGS__ \ |
- : "$8", "$9", "$10", "$11", "$12", \ |
- "$13", "$14", "$15", "$24", "$25", \ |
- "memory"); \ |
+ : LSS_SYSCALL_CLOBBERS); \ |
LSS_RETURN(type, __v0, __r7) |
#undef _syscall0 |
#define _syscall0(type, name) \ |