The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /* autogenerated by gensyscalls.py */ |
Elliott Hughes | 9aceab5 | 2013-03-12 14:57:30 -0700 | [diff] [blame^] | 2 | #include <linux/err.h> |
Elliott Hughes | 7582a9c | 2013-02-06 17:08:15 -0800 | [diff] [blame] | 3 | #include <machine/asm.h> |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 4 | #include <sys/linux-syscalls.h> |
| 5 | |
Elliott Hughes | 7582a9c | 2013-02-06 17:08:15 -0800 | [diff] [blame] | 6 | ENTRY(pread64) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 7 | pushl %ebx |
| 8 | pushl %ecx |
| 9 | pushl %edx |
| 10 | pushl %esi |
| 11 | pushl %edi |
| 12 | mov 24(%esp), %ebx |
| 13 | mov 28(%esp), %ecx |
| 14 | mov 32(%esp), %edx |
| 15 | mov 36(%esp), %esi |
| 16 | mov 40(%esp), %edi |
| 17 | movl $__NR_pread64, %eax |
| 18 | int $0x80 |
Elliott Hughes | 9aceab5 | 2013-03-12 14:57:30 -0700 | [diff] [blame^] | 19 | cmpl $-MAX_ERRNO, %eax |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 20 | jb 1f |
| 21 | negl %eax |
| 22 | pushl %eax |
| 23 | call __set_errno |
| 24 | addl $4, %esp |
| 25 | orl $-1, %eax |
| 26 | 1: |
| 27 | popl %edi |
| 28 | popl %esi |
| 29 | popl %edx |
| 30 | popl %ecx |
| 31 | popl %ebx |
| 32 | ret |
Elliott Hughes | 7582a9c | 2013-02-06 17:08:15 -0800 | [diff] [blame] | 33 | END(pread64) |