Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Unified Diff: lss/linux_syscall_support.h

Issue 389673002: MIPS: The new ABI should be allowed to use r8 and r9 for syscalls. (Closed) Base URL: http://linux-syscall-support.googlecode.com/svn/trunk/lss/
Patch Set: for committing, just rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) \
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698