static inline long __syscall0(long n)
{
register long r7 __asm__("$7");
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
__asm__ __volatile__ (
- "daddu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7)
+ "syscall"
+ : "+&r"(r2), "=r"(r7)
+ :
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
{
register long r4 __asm__("$4") = a;
register long r7 __asm__("$7");
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
__asm__ __volatile__ (
- "daddu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4)
+ "syscall"
+ : "+&r"(r2), "=r"(r7)
+ : "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");
+ register long r2 __asm__("$2") = n;
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
r5 = (long) &kst;
__asm__ __volatile__ (
- "daddu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4), "r"(r5)
+ "syscall"
+ : "+&r"(r2), "=r"(r7)
+ : "r"(r4), "r"(r5)
: SYSCALL_CLOBBERLIST);
if (r7) return -r2;
register long r5 __asm__("$5") = b;
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7");
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
r5 = (long) &kst;
__asm__ __volatile__ (
- "daddu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4), "r"(r5), "r"(r6)
+ "syscall"
+ : "+&r"(r2), "=r"(r7)
+ : "r"(r4), "r"(r5), "r"(r6)
: SYSCALL_CLOBBERLIST);
if (r7) return -r2;
register long r5 __asm__("$5") = b;
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7") = d;
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
r5 = (long) &kst;
r6 = (long) &kst;
__asm__ __volatile__ (
- "daddu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4), "r"(r5), "r"(r6)
+ "syscall"
+ : "+&r"(r2), "+r"(r7)
+ : "r"(r4), "r"(r5), "r"(r6)
: SYSCALL_CLOBBERLIST);
if (r7) return -r2;
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7") = d;
register long r8 __asm__("$8") = e;
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
r5 = (long) &kst;
r6 = (long) &kst;
__asm__ __volatile__ (
- "daddu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4), "r"(r5), "r"(r6), "r"(r8)
+ "syscall"
+ : "+&r"(r2), "+r"(r7)
+ : "r"(r4), "r"(r5), "r"(r6), "r"(r8)
: SYSCALL_CLOBBERLIST);
if (r7) return -r2;
register long r7 __asm__("$7") = d;
register long r8 __asm__("$8") = e;
register long r9 __asm__("$9") = f;
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
r5 = (long) &kst;
r6 = (long) &kst;
__asm__ __volatile__ (
- "daddu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
+ "syscall"
+ : "+&r"(r2), "+r"(r7)
+ : "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
: SYSCALL_CLOBBERLIST);
if (r7) return -r2;
static inline long __syscall0(long n)
{
register long r7 __asm__("$7");
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
__asm__ __volatile__ (
- "addu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7)
+ "syscall"
+ : "+&r"(r2), "=r"(r7)
+ :
: SYSCALL_CLOBBERLIST);
return r7 ? -r2 : r2;
}
{
register long r4 __asm__("$4") = a;
register long r7 __asm__("$7");
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
__asm__ __volatile__ (
- "addu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4)
+ "syscall"
+ : "+&r"(r2), "=r"(r7)
+ : "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");
+ register long r2 __asm__("$2") = n;
__asm__ __volatile__ (
- "addu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4), "r"(r5)
+ "syscall"
+ : "+&r"(r2), "=r"(r7)
+ : "r"(r4), "r"(r5)
: SYSCALL_CLOBBERLIST);
if (r7) return -r2;
long ret = r2;
register long r5 __asm__("$5") = b;
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7");
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
__asm__ __volatile__ (
- "addu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4), "r"(r5), "r"(r6)
+ "syscall"
+ : "+&r"(r2), "=r"(r7)
+ : "r"(r4), "r"(r5), "r"(r6)
: SYSCALL_CLOBBERLIST);
if (r7) return -r2;
long ret = r2;
register long r5 __asm__("$5") = b;
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7") = d;
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
__asm__ __volatile__ (
- "addu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4), "r"(r5), "r"(r6)
+ "syscall"
+ : "+&r"(r2), "+r"(r7)
+ : "r"(r4), "r"(r5), "r"(r6)
: SYSCALL_CLOBBERLIST);
if (r7) return -r2;
long ret = r2;
register long r6 __asm__("$6") = c;
register long r7 __asm__("$7") = d;
register long r8 __asm__("$8") = e;
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
__asm__ __volatile__ (
- "addu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4), "r"(r5), "r"(r6), "r"(r8)
+ "syscall"
+ : "+&r"(r2), "+r"(r7)
+ : "r"(r4), "r"(r5), "r"(r6), "r"(r8)
: SYSCALL_CLOBBERLIST);
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat) __stat_fix(b);
if (n == SYS_newfstatat) __stat_fix(c);
register long r7 __asm__("$7") = d;
register long r8 __asm__("$8") = e;
register long r9 __asm__("$9") = f;
- register long r2 __asm__("$2");
+ register long r2 __asm__("$2") = n;
__asm__ __volatile__ (
- "addu $2,$0,%2 ; syscall"
- : "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
- "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
+ "syscall"
+ : "+&r"(r2), "+r"(r7)
+ : "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
: SYSCALL_CLOBBERLIST);
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat) __stat_fix(b);
if (n == SYS_newfstatat) __stat_fix(c);