static inline long __syscall0(long n)
{
register long r7 __asm__("$7");
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "=r"(r7)
- :
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "=r"(r7)
+ : "ir"(n), "0"(r2)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
{
register long r4 __asm__("$4") = a;
register long r7 __asm__("$7");
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "=r"(r7)
- : "r"(r4)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "=r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
register long r4 __asm__("$4") = a;
register long r5 __asm__("$5") = b;
register long r7 __asm__("$7");
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "=r"(r7)
- : "r"(r4), "r"(r5)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "=r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4), "r"(r5)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
register long r5 __asm__("$5") = b;
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7");
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "=r"(r7)
- : "r"(r4), "r"(r5), "r"(r6)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "=r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
register long r5 __asm__("$5") = b;
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7") = d;
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "+r"(r7)
- : "r"(r4), "r"(r5), "r"(r6)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "+r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7") = d;
register long r8 __asm__("$8") = e;
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "+r"(r7)
- : "r"(r4), "r"(r5), "r"(r6), "r"(r8)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "+r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6), "r"(r8)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
register long r7 __asm__("$7") = d;
register long r8 __asm__("$8") = e;
register long r9 __asm__("$9") = f;
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "+r"(r7)
- : "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "+r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
static inline long __syscall0(long n)
{
register long r7 __asm__("$7");
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "=r"(r7)
- :
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "=r"(r7)
+ : "ir"(n), "0"(r2)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
{
register long r4 __asm__("$4") = a;
register long r7 __asm__("$7");
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "=r"(r7)
- : "r"(r4)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "=r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
register long r4 __asm__("$4") = a;
register long r5 __asm__("$5") = b;
register long r7 __asm__("$7");
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
+
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "=r"(r7)
- : "r"(r4), "r"(r5)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "=r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4), "r"(r5)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
register long r5 __asm__("$5") = b;
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7");
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
+
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "=r"(r7)
- : "r"(r4), "r"(r5), "r"(r6)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "=r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
register long r5 __asm__("$5") = b;
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7") = d;
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
+
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "+r"(r7)
- : "r"(r4), "r"(r5), "r"(r6)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "+r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7") = d;
register long r8 __asm__("$8") = e;
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
+
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "+r"(r7)
- : "r"(r4), "r"(r5), "r"(r6), "r"(r8)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "+r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6), "r"(r8)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
register long r7 __asm__("$7") = d;
register long r8 __asm__("$8") = e;
register long r9 __asm__("$9") = f;
- register long r2 __asm__("$2") = n;
+ register long r2 __asm__("$2");
+
__asm__ __volatile__ (
- "syscall"
- : "+&r"(r2), "+r"(r7)
- : "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
+ "daddu $2,$0,%2 ; syscall"
+ : "=&r"(r2), "+r"(r7)
+ : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}