__uClibc_syscall.S 560 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. .globl __uClibc_syscall
  2. .text
  3. .align 4
  4. __uClibc_syscall:
  5. pushl %ebp
  6. movl %esp,%ebp
  7. subl $8,%esp
  8. pushl %edi
  9. pushl %esi
  10. pushl %ebx
  11. /* movl $21,%eax */
  12. and $0xff,%eax
  13. movl 8(%ebp),%ebx
  14. movl 12(%ebp),%ecx
  15. movl 16(%ebp),%edx
  16. movl 20(%ebp),%esi
  17. movl 24(%ebp),%edi
  18. #APP
  19. int $0x80
  20. #NO_APP
  21. movl %eax,-4(%ebp)
  22. .p2align 4,,7
  23. cmpl $-126,-4(%ebp)
  24. jbe .L5
  25. movl -4(%ebp),%eax
  26. negl %eax
  27. movl %eax,errno
  28. movl $-1,-4(%ebp)
  29. .L5:
  30. movl -4(%ebp),%edx
  31. movl %edx,-8(%ebp)
  32. movl -8(%ebp),%eax
  33. leal -20(%ebp),%esp
  34. popl %ebx
  35. popl %esi
  36. popl %edi
  37. leave
  38. ret