write.S revision e4ffd9f2341f42c9281b4a93df76768580535edd
1/* autogenerated by gensyscalls.py */
2#include <asm/unistd.h>
3#include <linux/err.h>
4#include <machine/asm.h>
5
6ENTRY(write)
7    pushl   %ebx
8    pushl   %ecx
9    pushl   %edx
10    mov     16(%esp), %ebx
11    mov     20(%esp), %ecx
12    mov     24(%esp), %edx
13    movl    $__NR_write, %eax
14    int     $0x80
15    cmpl    $-MAX_ERRNO, %eax
16    jb      1f
17    negl    %eax
18    pushl   %eax
19    call    __set_errno
20    addl    $4, %esp
21    orl     $-1, %eax
221:
23    popl    %edx
24    popl    %ecx
25    popl    %ebx
26    ret
27END(write)
28