]> git.buserror.net Git - polintos/scott/priv.git/blob - doc/abi/x86
Change x86 syscalls to direct branches, and define abi for additional syscalls.
[polintos/scott/priv.git] / doc / abi / x86
1 Basic ABI: SysV i386
2
3 Out-of-Process Method Invocation:
4    Caller:
5       eax: pointer to parameter info block (PIB)
6
7       Call 0x7fff0000 to invoke the method.
8       
9       Upon return:
10       ebx, esi, edi, ebp, esp: preserved
11       eax: pointer to exception, or NULL if none
12            If there is an exception, the user part of the syscall
13            function will search for an exception handling function
14            that covers the calling address.  If none is found,
15            it will assume that it is a language without exception
16            handling, an5Ad return the exception to the caller in eax.
17       edx: length of exception segment, if any
18       ecx: may be clobbered
19       
20    Callee:
21       eax: pointer to PIB
22       edx: pointer to caller information struct, or NULL if not
23            requested
24       esp: NULL.
25
26       Jump to 0x7fff0080 to return.
27       
28       Upon return:
29       eax: pointer to exception, or NULL if none
30       edx: length of exception segment, if any
31       ebx, ecx, esi, edi, ebp, esp: may be clobbered
32
33 Other system calls:
34         eax, edx, ecx: syscall arguments.
35         
36         Call 0x7fff0000 + 0x80 * syscallnum
37
38         eax: return value
39         edx, ecx: may be clobbered