PageRenderTime 50ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/libc/arch-x86/syscalls/write.S

https://bitbucket.org/patrikryd/bionic
Assembly | 29 lines | 27 code | 2 blank | 0 comment | 0 complexity | aca3a0d2f8b9a563ab8da2a664f7353c MD5 | raw file
  1. /* autogenerated by gensyscalls.py */
  2. #include <sys/linux-syscalls.h>
  3. .text
  4. .type write, @function
  5. .globl write
  6. .align 4
  7. write:
  8. pushl %ebx
  9. pushl %ecx
  10. pushl %edx
  11. mov 16(%esp), %ebx
  12. mov 20(%esp), %ecx
  13. mov 24(%esp), %edx
  14. movl $__NR_write, %eax
  15. int $0x80
  16. cmpl $-129, %eax
  17. jb 1f
  18. negl %eax
  19. pushl %eax
  20. call __set_errno
  21. addl $4, %esp
  22. orl $-1, %eax
  23. 1:
  24. popl %edx
  25. popl %ecx
  26. popl %ebx
  27. ret