| OLD | NEW |
| 1 #define __SYSCALL_LL_E(x) (x) | 1 #define __SYSCALL_LL_E(x) (x) |
| 2 #define __SYSCALL_LL_O(x) (x) | 2 #define __SYSCALL_LL_O(x) (x) |
| 3 | 3 |
| 4 #define __asm_syscall(...) do { \ | 4 #define __asm_syscall(...) \ |
| 5 » __asm__ __volatile__ ( "svc 0" \ | 5 do { \ |
| 6 » : "=r"(x0) : __VA_ARGS__ : "memory", "cc"); \ | 6 __asm__ __volatile__("svc 0" : "=r"(x0) : __VA_ARGS__ : "memory", "cc"); \ |
| 7 » return x0; \ | 7 return x0; \ |
| 8 » } while (0) | 8 } while (0) |
| 9 | 9 |
| 10 static inline long __syscall0(long n) | 10 static inline long __syscall0(long n) { |
| 11 { | 11 register long x8 __asm__("x8") = n; |
| 12 » register long x8 __asm__("x8") = n; | 12 register long x0 __asm__("x0"); |
| 13 » register long x0 __asm__("x0"); | 13 __asm_syscall("r"(x8)); |
| 14 » __asm_syscall("r"(x8)); | |
| 15 } | 14 } |
| 16 | 15 |
| 17 static inline long __syscall1(long n, long a) | 16 static inline long __syscall1(long n, long a) { |
| 18 { | 17 register long x8 __asm__("x8") = n; |
| 19 » register long x8 __asm__("x8") = n; | 18 register long x0 __asm__("x0") = a; |
| 20 » register long x0 __asm__("x0") = a; | 19 __asm_syscall("r"(x8), "0"(x0)); |
| 21 » __asm_syscall("r"(x8), "0"(x0)); | |
| 22 } | 20 } |
| 23 | 21 |
| 24 static inline long __syscall2(long n, long a, long b) | 22 static inline long __syscall2(long n, long a, long b) { |
| 25 { | 23 register long x8 __asm__("x8") = n; |
| 26 » register long x8 __asm__("x8") = n; | 24 register long x0 __asm__("x0") = a; |
| 27 » register long x0 __asm__("x0") = a; | 25 register long x1 __asm__("x1") = b; |
| 28 » register long x1 __asm__("x1") = b; | 26 __asm_syscall("r"(x8), "0"(x0), "r"(x1)); |
| 29 » __asm_syscall("r"(x8), "0"(x0), "r"(x1)); | |
| 30 } | 27 } |
| 31 | 28 |
| 32 static inline long __syscall3(long n, long a, long b, long c) | 29 static inline long __syscall3(long n, long a, long b, long c) { |
| 33 { | 30 register long x8 __asm__("x8") = n; |
| 34 » register long x8 __asm__("x8") = n; | 31 register long x0 __asm__("x0") = a; |
| 35 » register long x0 __asm__("x0") = a; | 32 register long x1 __asm__("x1") = b; |
| 36 » register long x1 __asm__("x1") = b; | 33 register long x2 __asm__("x2") = c; |
| 37 » register long x2 __asm__("x2") = c; | 34 __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2)); |
| 38 » __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2)); | |
| 39 } | 35 } |
| 40 | 36 |
| 41 static inline long __syscall4(long n, long a, long b, long c, long d) | 37 static inline long __syscall4(long n, long a, long b, long c, long d) { |
| 42 { | 38 register long x8 __asm__("x8") = n; |
| 43 » register long x8 __asm__("x8") = n; | 39 register long x0 __asm__("x0") = a; |
| 44 » register long x0 __asm__("x0") = a; | 40 register long x1 __asm__("x1") = b; |
| 45 » register long x1 __asm__("x1") = b; | 41 register long x2 __asm__("x2") = c; |
| 46 » register long x2 __asm__("x2") = c; | 42 register long x3 __asm__("x3") = d; |
| 47 » register long x3 __asm__("x3") = d; | 43 __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3)); |
| 48 » __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3)); | |
| 49 } | 44 } |
| 50 | 45 |
| 51 static inline long __syscall5(long n, long a, long b, long c, long d, long e) | 46 static inline long __syscall5(long n, long a, long b, long c, long d, long e) { |
| 52 { | 47 register long x8 __asm__("x8") = n; |
| 53 » register long x8 __asm__("x8") = n; | 48 register long x0 __asm__("x0") = a; |
| 54 » register long x0 __asm__("x0") = a; | 49 register long x1 __asm__("x1") = b; |
| 55 » register long x1 __asm__("x1") = b; | 50 register long x2 __asm__("x2") = c; |
| 56 » register long x2 __asm__("x2") = c; | 51 register long x3 __asm__("x3") = d; |
| 57 » register long x3 __asm__("x3") = d; | 52 register long x4 __asm__("x4") = e; |
| 58 » register long x4 __asm__("x4") = e; | 53 __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3), "r"(x4)); |
| 59 » __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3), "r"(x4)); | |
| 60 } | 54 } |
| 61 | 55 |
| 62 static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
ng f) | 56 static inline long |
| 63 { | 57 __syscall6(long n, long a, long b, long c, long d, long e, long f) { |
| 64 » register long x8 __asm__("x8") = n; | 58 register long x8 __asm__("x8") = n; |
| 65 » register long x0 __asm__("x0") = a; | 59 register long x0 __asm__("x0") = a; |
| 66 » register long x1 __asm__("x1") = b; | 60 register long x1 __asm__("x1") = b; |
| 67 » register long x2 __asm__("x2") = c; | 61 register long x2 __asm__("x2") = c; |
| 68 » register long x3 __asm__("x3") = d; | 62 register long x3 __asm__("x3") = d; |
| 69 » register long x4 __asm__("x4") = e; | 63 register long x4 __asm__("x4") = e; |
| 70 » register long x5 __asm__("x5") = f; | 64 register long x5 __asm__("x5") = f; |
| 71 » __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3), "r"(x4), "r"(
x5)); | 65 __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3), "r"(x4), "r"(x5)); |
| 72 } | 66 } |
| 73 | 67 |
| 74 #define VDSO_USEFUL | 68 #define VDSO_USEFUL |
| 75 #define VDSO_CGT_SYM "__kernel_clock_gettime" | 69 #define VDSO_CGT_SYM "__kernel_clock_gettime" |
| 76 #define VDSO_CGT_VER "LINUX_2.6.39" | 70 #define VDSO_CGT_VER "LINUX_2.6.39" |
| OLD | NEW |