Rev 1217 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1217 | Rev 1276 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | 28 | ||
29 | #include <libc.h> |
29 | #include <libc.h> |
30 | 30 | ||
31 | sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, const sysarg_t p4, const syscall_t id) |
31 | sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, const sysarg_t p4, const syscall_t id) |
32 | { |
32 | { |
33 | register sysarg_t __ppc32_reg_r3 asm("3") = id; |
33 | register sysarg_t __ppc32_reg_r3 asm("3") = p1; |
34 | register sysarg_t __ppc32_reg_r4 asm("4") = p1; |
34 | register sysarg_t __ppc32_reg_r4 asm("4") = p2; |
35 | register sysarg_t __ppc32_reg_r5 asm("5") = p2; |
35 | register sysarg_t __ppc32_reg_r5 asm("5") = p3; |
36 | register sysarg_t __ppc32_reg_r6 asm("6") = p3; |
36 | register sysarg_t __ppc32_reg_r6 asm("6") = p4; |
37 | register sysarg_t __ppc32_reg_r7 asm("7") = p4; |
37 | register sysarg_t __ppc32_reg_r7 asm("7") = id; |
38 | 38 | ||
39 | asm volatile ( |
39 | asm volatile ( |
40 | "sc\n" |
40 | "sc\n" |
41 | : "=r" (__ppc32_reg_r3) |
41 | : "=r" (__ppc32_reg_r3) |
42 | : "r" (__ppc32_reg_r3), |
42 | : "r" (__ppc32_reg_r3), |