Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Side by Side Diff: fusl/arch/i386/syscall_arch.h

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/arch/i386/reloc.h ('k') | fusl/arch/microblaze/atomic.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #define __SYSCALL_LL_E(x) \
2 ((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
3 ((union { long long ll; long l[2]; }){ .ll = x }).l[1]
4 #define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
5
6 static inline long __syscall0(long n)
7 {
8 unsigned long __ret;
9 __asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__re t) : "a"(n) : "memory");
10 return __ret;
11 }
12
13 static inline long __syscall1(long n, long a1)
14 {
15 unsigned long __ret;
16 __asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__re t) : "a"(n), "d"(a1) : "memory");
17 return __ret;
18 }
19
20 static inline long __syscall2(long n, long a1, long a2)
21 {
22 unsigned long __ret;
23 __asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__re t) : "a"(n), "d"(a1), "c"(a2) : "memory");
24 return __ret;
25 }
26
27 static inline long __syscall3(long n, long a1, long a2, long a3)
28 {
29 unsigned long __ret;
30 __asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__re t) : "a"(n), "d"(a1), "c"(a2), "D"(a3) : "memory");
31 return __ret;
32 }
33
34 static inline long __syscall4(long n, long a1, long a2, long a3, long a4)
35 {
36 unsigned long __ret;
37 __asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__re t) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4) : "memory");
38 return __ret;
39 }
40
41 static inline long __syscall5(long n, long a1, long a2, long a3, long a4, long a 5)
42 {
43 unsigned long __ret;
44 __asm__ __volatile__ ("push %6 ; .hidden __vsyscall ; call __vsyscall ; add $4,%%esp" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4), "g"(a5 ) : "memory");
45 return __ret;
46 }
47
48 static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a 5, long a6)
49 {
50 unsigned long __ret;
51 __asm__ __volatile__ ("push %6 ; .hidden __vsyscall6 ; call __vsyscall6 ; add $4,%%esp" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4), "g"( 0+(long[]){a5, a6}) : "memory");
52 return __ret;
53 }
54
55 #define VDSO_USEFUL
56 #define VDSO_CGT_SYM "__vdso_clock_gettime"
57 #define VDSO_CGT_VER "LINUX_2.6"
OLDNEW
« no previous file with comments | « fusl/arch/i386/reloc.h ('k') | fusl/arch/microblaze/atomic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698