blob: bb7c92fa5452b70910d94f9ddafe9b2bb0f93a8a [file] [log] [blame]
Elliott Hughes103ccde2013-10-16 14:27:59 -07001/* Generated by gensyscalls.py. Do not edit. */
2
Elliott Hughesed744842013-11-07 10:31:05 -08003#include <private/bionic_asm.h>
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08004
Elliott Hughescac7b9d2013-10-23 09:48:29 -07005ENTRY(dup3)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08006 pushl %ebx
7 pushl %ecx
Elliott Hughescac7b9d2013-10-23 09:48:29 -07008 pushl %edx
9 mov 16(%esp), %ebx
10 mov 20(%esp), %ecx
11 mov 24(%esp), %edx
12 movl $__NR_dup3, %eax
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080013 int $0x80
Elliott Hughes9aceab52013-03-12 14:57:30 -070014 cmpl $-MAX_ERRNO, %eax
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015 jb 1f
16 negl %eax
17 pushl %eax
18 call __set_errno
19 addl $4, %esp
20 orl $-1, %eax
211:
Elliott Hughescac7b9d2013-10-23 09:48:29 -070022 popl %edx
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080023 popl %ecx
24 popl %ebx
25 ret
Elliott Hughescac7b9d2013-10-23 09:48:29 -070026END(dup3)