Rev 2479 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2479 | Rev 2609 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | /** @file |
34 | /** @file |
35 | */ |
35 | */ |
36 | 36 | ||
37 | #include <libc.h> |
37 | #include <libc.h> |
38 | 38 | ||
- | 39 | sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, |
|
39 | sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, const sysarg_t p4, const syscall_t id) |
40 | const sysarg_t p4, const sysarg_t p5, const sysarg_t p6, const syscall_t id) |
40 | { |
41 | { |
41 | register sysarg_t __ppc32_reg_r3 asm("3") = p1; |
42 | register sysarg_t __ppc32_reg_r3 asm("3") = p1; |
42 | register sysarg_t __ppc32_reg_r4 asm("4") = p2; |
43 | register sysarg_t __ppc32_reg_r4 asm("4") = p2; |
43 | register sysarg_t __ppc32_reg_r5 asm("5") = p3; |
44 | register sysarg_t __ppc32_reg_r5 asm("5") = p3; |
44 | register sysarg_t __ppc32_reg_r6 asm("6") = p4; |
45 | register sysarg_t __ppc32_reg_r6 asm("6") = p4; |
45 | register sysarg_t __ppc32_reg_r7 asm("7") = id; |
46 | register sysarg_t __ppc32_reg_r7 asm("7") = p5; |
- | 47 | register sysarg_t __ppc32_reg_r8 asm("8") = p6; |
|
- | 48 | register sysarg_t __ppc32_reg_r9 asm("9") = id; |
|
46 | 49 | ||
47 | asm volatile ( |
50 | asm volatile ( |
48 | "sc\n" |
51 | "sc\n" |
49 | : "=r" (__ppc32_reg_r3) |
52 | : "=r" (__ppc32_reg_r3) |
50 | : "r" (__ppc32_reg_r3), |
53 | : "r" (__ppc32_reg_r3), |
51 | "r" (__ppc32_reg_r4), |
54 | "r" (__ppc32_reg_r4), |
52 | "r" (__ppc32_reg_r5), |
55 | "r" (__ppc32_reg_r5), |
53 | "r" (__ppc32_reg_r6), |
56 | "r" (__ppc32_reg_r6), |
54 | "r" (__ppc32_reg_r7) |
57 | "r" (__ppc32_reg_r7), |
- | 58 | "r" (__ppc32_reg_r8), |
|
- | 59 | "r" (__ppc32_reg_r9) |
|
55 | ); |
60 | ); |
56 | 61 | ||
57 | return __ppc32_reg_r3; |
62 | return __ppc32_reg_r3; |
58 | } |
63 | } |
59 | 64 |