Annotation of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/i386/varsyscall.S
Parent Directory | Revision Log
Revision 815 -
(hide annotations)
(download)
Fri Apr 24 18:32:46 2009 UTC (15 years, 1 month ago) by niro
File size: 649 byte(s)
Fri Apr 24 18:32:46 2009 UTC (15 years, 1 month ago) by niro
File size: 649 byte(s)
-updated to klibc-1.5.15
1 | niro | 532 | /* |
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 | niro | 815 | #define ARG(n) (4*n+24)(%esp) |
13 | #define SYSNO ARG(-2) | ||
14 | niro | 532 | |
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 | niro | 815 | movl SYSNO,%eax |
26 | niro | 532 | 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 |