summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/linux/mips/raw_syscall.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/linux/mips/raw_syscall.h b/src/linux/mips/raw_syscall.h
index 4dd1b831f..ca9d57bfe 100644
--- a/src/linux/mips/raw_syscall.h
+++ b/src/linux/mips/raw_syscall.h
@@ -12,6 +12,18 @@
# include "kernel_types.h"
+#if __mips_isa_rev >= 6
+#define SYSCALL_CLOBBERLIST \
+ "memory", "$1", "$3", "$8", "$9", \
+ "$10", "$11", "$12", "$13", "$14", "$15", \
+ "$24", "$25"
+#else
+#define SYSCALL_CLOBBERLIST \
+ "memory", "hi", "lo", "$1", "$3", "$8", "$9", \
+ "$10", "$11", "$12", "$13", "$14", "$15", \
+ "$24", "$25"
+#endif
+
static inline kernel_ulong_t
raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
{
@@ -24,9 +36,7 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
".set reorder"
: "=r"(v0), "=r"(a3)
: "r"(s0)
- : "memory", "hi", "lo", "$1", "$3", "$8", "$9",
- "$10", "$11", "$12", "$13", "$14", "$15",
- "$24", "$25");
+ : SYSCALL_CLOBBERLIST);
*err = a3;
return v0;
}