Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/i386/varsyscall.S
Parent Directory | Revision Log
Revision 815 -
(show annotations)
(download)
Fri Apr 24 18:32:46 2009 UTC (15 years ago) by niro
File size: 649 byte(s)
Fri Apr 24 18:32:46 2009 UTC (15 years ago) by niro
File size: 649 byte(s)
-updated to klibc-1.5.15
1 | /* |
2 | * arch/i386/varsyscall.S |
3 | * |
4 | * Common tail-handling code for varadic system calls (which always |
5 | * use the cdecl convention.) |
6 | * |
7 | * The arguments are on the stack; the system call number in %eax. |
8 | */ |
9 | |
10 | #ifdef _REGPARM |
11 | |
12 | #define ARG(n) (4*n+24)(%esp) |
13 | #define SYSNO ARG(-2) |
14 | |
15 | .text |
16 | .align 4 |
17 | .globl __syscall_varadic |
18 | .type __syscall_varadic,@function |
19 | __syscall_varadic: |
20 | pushl %ebx |
21 | pushl %esi |
22 | pushl %edi |
23 | pushl %ebp |
24 | |
25 | movl SYSNO,%eax |
26 | movl ARG(0),%ebx # Syscall arguments |
27 | movl ARG(1),%ecx |
28 | movl ARG(2),%edx |
29 | movl ARG(3),%esi |
30 | movl ARG(4),%edi |
31 | movl ARG(5),%ebp |
32 | |
33 | jmp __syscall_common_tail |
34 | |
35 | .size __syscall_varadic,.-__syscall_varadic |
36 | |
37 | #endif |