fix syscall asm constraints for arm too
authorRich Felker <dalias@aerifal.cx>
Sat, 15 Sep 2012 07:19:41 +0000 (03:19 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 15 Sep 2012 07:19:41 +0000 (03:19 -0400)
no problems were detected so far, but the constraints seem to have
been invalid just like the mips ones.

arch/arm/syscall_arch.h

index 14ca852..f50c3b4 100644 (file)
@@ -24,7 +24,7 @@ static inline long __syscall1(long n, long a)
 {
        register long r7 __asm__("r7") = n;
        register long r0 __asm__("r0") = a;
 {
        register long r7 __asm__("r7") = n;
        register long r0 __asm__("r0") = a;
-       __asm_syscall("r"(r7), "r"(r0));
+       __asm_syscall("r"(r7), "0"(r0));
 }
 
 static inline long __syscall2(long n, long a, long b)
 }
 
 static inline long __syscall2(long n, long a, long b)
@@ -32,7 +32,7 @@ static inline long __syscall2(long n, long a, long b)
        register long r7 __asm__("r7") = n;
        register long r0 __asm__("r0") = a;
        register long r1 __asm__("r1") = b;
        register long r7 __asm__("r7") = n;
        register long r0 __asm__("r0") = a;
        register long r1 __asm__("r1") = b;
-       __asm_syscall("r"(r7), "r"(r0), "r"(r1));
+       __asm_syscall("r"(r7), "0"(r0), "r"(r1));
 }
 
 static inline long __syscall3(long n, long a, long b, long c)
 }
 
 static inline long __syscall3(long n, long a, long b, long c)
@@ -41,7 +41,7 @@ static inline long __syscall3(long n, long a, long b, long c)
        register long r0 __asm__("r0") = a;
        register long r1 __asm__("r1") = b;
        register long r2 __asm__("r2") = c;
        register long r0 __asm__("r0") = a;
        register long r1 __asm__("r1") = b;
        register long r2 __asm__("r2") = c;
-       __asm_syscall("r"(r7), "r"(r0), "r"(r1), "r"(r2));
+       __asm_syscall("r"(r7), "0"(r0), "r"(r1), "r"(r2));
 }
 
 static inline long __syscall4(long n, long a, long b, long c, long d)
 }
 
 static inline long __syscall4(long n, long a, long b, long c, long d)
@@ -51,7 +51,7 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
        register long r1 __asm__("r1") = b;
        register long r2 __asm__("r2") = c;
        register long r3 __asm__("r3") = d;
        register long r1 __asm__("r1") = b;
        register long r2 __asm__("r2") = c;
        register long r3 __asm__("r3") = d;
-       __asm_syscall("r"(r7), "r"(r0), "r"(r1), "r"(r2), "r"(r3));
+       __asm_syscall("r"(r7), "0"(r0), "r"(r1), "r"(r2), "r"(r3));
 }
 
 #else
 }
 
 #else