@@ -87,8 +87,9 @@
#define internal_syscall1(string,err,name,arg1) \
({ \
+ long _arg1 = (long) (arg1); \
register long __err __asm__("g1") = (name); \
- register long __o0 __asm__ ("o0") = (long)(arg1); \
+ register long __o0 __asm__ ("o0") = _arg1; \
__asm __volatile (string : "=r" (__err), "=r" (__o0) : \
"0" (__err), "1" (__o0) : \
__SYSCALL_CLOBBERS); \
@@ -97,9 +98,11 @@
#define internal_syscall2(string,err,name,arg1,arg2) \
({ \
+ long _arg1 = (long) (arg1); \
+ long _arg2 = (long) (arg2); \
register long __err __asm__("g1") = (name); \
- register long __o0 __asm__ ("o0") = (long)(arg1); \
- register long __o1 __asm__ ("o1") = (long)(arg2); \
+ register long __o0 __asm__ ("o0") = _arg1; \
+ register long __o1 __asm__ ("o1") = _arg2; \
__asm __volatile (string : "=r" (__err), "=r" (__o0) : \
"0" (__err), "1" (__o0), "r" (__o1) : \
__SYSCALL_CLOBBERS); \
@@ -108,10 +111,13 @@
#define internal_syscall3(string,err,name,arg1,arg2,arg3) \
({ \
+ long _arg1 = (long) (arg1); \
+ long _arg2 = (long) (arg2); \
+ long _arg3 = (long) (arg3); \
register long __err __asm__("g1") = (name); \
- register long __o0 __asm__ ("o0") = (long)(arg1); \
- register long __o1 __asm__ ("o1") = (long)(arg2); \
- register long __o2 __asm__ ("o2") = (long)(arg3); \
+ register long __o0 __asm__ ("o0") = _arg1; \
+ register long __o1 __asm__ ("o1") = _arg2; \
+ register long __o2 __asm__ ("o2") = _arg3; \
__asm __volatile (string : "=r" (__err), "=r" (__o0) : \
"0" (__err), "1" (__o0), "r" (__o1), \
"r" (__o2) : \
@@ -121,11 +127,15 @@
#define internal_syscall4(string,err,name,arg1,arg2,arg3,arg4) \
({ \
+ long _arg1 = (long) (arg1); \
+ long _arg2 = (long) (arg2); \
+ long _arg3 = (long) (arg3); \
+ long _arg4 = (long) (arg4); \
register long __err __asm__("g1") = (name); \
- register long __o0 __asm__ ("o0") = (long)(arg1); \
- register long __o1 __asm__ ("o1") = (long)(arg2); \
- register long __o2 __asm__ ("o2") = (long)(arg3); \
- register long __o3 __asm__ ("o3") = (long)(arg4); \
+ register long __o0 __asm__ ("o0") = _arg1; \
+ register long __o1 __asm__ ("o1") = _arg2; \
+ register long __o2 __asm__ ("o2") = _arg3; \
+ register long __o3 __asm__ ("o3") = _arg4; \
__asm __volatile (string : "=r" (__err), "=r" (__o0) : \
"0" (__err), "1" (__o0), "r" (__o1), \
"r" (__o2), "r" (__o3) : \
@@ -135,12 +145,17 @@
#define internal_syscall5(string,err,name,arg1,arg2,arg3,arg4,arg5) \
({ \
+ long _arg1 = (long) (arg1); \
+ long _arg2 = (long) (arg2); \
+ long _arg3 = (long) (arg3); \
+ long _arg4 = (long) (arg4); \
+ long _arg5 = (long) (arg5); \
register long __err __asm__("g1") = (name); \
- register long __o0 __asm__ ("o0") = (long)(arg1); \
- register long __o1 __asm__ ("o1") = (long)(arg2); \
- register long __o2 __asm__ ("o2") = (long)(arg3); \
- register long __o3 __asm__ ("o3") = (long)(arg4); \
- register long __o4 __asm__ ("o4") = (long)(arg5); \
+ register long __o0 __asm__ ("o0") = _arg1; \
+ register long __o1 __asm__ ("o1") = _arg2; \
+ register long __o2 __asm__ ("o2") = _arg3; \
+ register long __o3 __asm__ ("o3") = _arg4; \
+ register long __o4 __asm__ ("o4") = _arg5; \
__asm __volatile (string : "=r" (__err), "=r" (__o0) : \
"0" (__err), "1" (__o0), "r" (__o1), \
"r" (__o2), "r" (__o3), "r" (__o4) : \
@@ -150,13 +165,19 @@
#define internal_syscall6(string,err,name,arg1,arg2,arg3,arg4,arg5,arg6)\
({ \
+ long _arg1 = (long) (arg1); \
+ long _arg2 = (long) (arg2); \
+ long _arg3 = (long) (arg3); \
+ long _arg4 = (long) (arg4); \
+ long _arg5 = (long) (arg5); \
+ long _arg6 = (long) (arg6); \
register long __err __asm__("g1") = (name); \
- register long __o0 __asm__ ("o0") = (long)(arg1); \
- register long __o1 __asm__ ("o1") = (long)(arg2); \
- register long __o2 __asm__ ("o2") = (long)(arg3); \
- register long __o3 __asm__ ("o3") = (long)(arg4); \
- register long __o4 __asm__ ("o4") = (long)(arg5); \
- register long __o5 __asm__ ("o5") = (long)(arg6); \
+ register long __o0 __asm__ ("o0") = _arg1; \
+ register long __o1 __asm__ ("o1") = _arg2; \
+ register long __o2 __asm__ ("o2") = _arg3; \
+ register long __o3 __asm__ ("o3") = _arg4; \
+ register long __o4 __asm__ ("o4") = _arg5; \
+ register long __o5 __asm__ ("o5") = _arg6; \
__asm __volatile (string : "=r" (__err), "=r" (__o0) : \
"0" (__err), "1" (__o0), "r" (__o1), \
"r" (__o2), "r" (__o3), "r" (__o4), \
@@ -167,11 +188,16 @@
#define INLINE_CLONE_SYSCALL(arg1,arg2,arg3,arg4,arg5) \
({ \
- register long __o0 __asm__ ("o0") = (long)(arg1); \
- register long __o1 __asm__ ("o1") = (long)(arg2); \
- register long __o2 __asm__ ("o2") = (long)(arg3); \
- register long __o3 __asm__ ("o3") = (long)(arg4); \
- register long __o4 __asm__ ("o4") = (long)(arg5); \
+ long _arg1 = (long) (arg1); \
+ long _arg2 = (long) (arg2); \
+ long _arg3 = (long) (arg3); \
+ long _arg4 = (long) (arg4); \
+ long _arg5 = (long) (arg5); \
+ register long __o0 __asm__ ("o0") = _arg1; \
+ register long __o1 __asm__ ("o1") = _arg2; \
+ register long __o2 __asm__ ("o2") = _arg3; \
+ register long __o3 __asm__ ("o3") = _arg4; \
+ register long __o4 __asm__ ("o4") = _arg5; \
register long __g1 __asm__ ("g1") = __NR_clone; \
__asm __volatile (__SYSCALL_STRING : \
"=r" (__g1), "=r" (__o0), "=r" (__o1) : \