syscall-stubs.S 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * Copyright (C) 2005-2006 Atmel Corporation
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. /*
  9. * Stubs for syscalls that require access to pt_regs or that take more
  10. * than five parameters.
  11. */
  12. #define ARG6 r3
  13. .text
  14. .global __sys_rt_sigsuspend
  15. .type __sys_rt_sigsuspend,@function
  16. __sys_rt_sigsuspend:
  17. mov r10, sp
  18. rjmp sys_rt_sigsuspend
  19. .global __sys_rt_sigreturn
  20. .type __sys_rt_sigreturn,@function
  21. __sys_rt_sigreturn:
  22. mov r12, sp
  23. rjmp sys_rt_sigreturn
  24. .global __sys_mmap2
  25. .type __sys_mmap2,@function
  26. __sys_mmap2:
  27. pushm lr
  28. st.w --sp, ARG6
  29. call sys_mmap_pgoff
  30. sub sp, -4
  31. popm pc
  32. .global __sys_sendto
  33. .type __sys_sendto,@function
  34. __sys_sendto:
  35. pushm lr
  36. st.w --sp, ARG6
  37. call sys_sendto
  38. sub sp, -4
  39. popm pc
  40. .global __sys_recvfrom
  41. .type __sys_recvfrom,@function
  42. __sys_recvfrom:
  43. pushm lr
  44. st.w --sp, ARG6
  45. call sys_recvfrom
  46. sub sp, -4
  47. popm pc
  48. .global __sys_pselect6
  49. .type __sys_pselect6,@function
  50. __sys_pselect6:
  51. pushm lr
  52. st.w --sp, ARG6
  53. call sys_pselect6
  54. sub sp, -4
  55. popm pc
  56. .global __sys_splice
  57. .type __sys_splice,@function
  58. __sys_splice:
  59. pushm lr
  60. st.w --sp, ARG6
  61. call sys_splice
  62. sub sp, -4
  63. popm pc
  64. .global __sys_epoll_pwait
  65. .type __sys_epoll_pwait,@function
  66. __sys_epoll_pwait:
  67. pushm lr
  68. st.w --sp, ARG6
  69. call sys_epoll_pwait
  70. sub sp, -4
  71. popm pc
  72. .global __sys_sync_file_range
  73. .type __sys_sync_file_range,@function
  74. __sys_sync_file_range:
  75. pushm lr
  76. st.w --sp, ARG6
  77. call sys_sync_file_range
  78. sub sp, -4
  79. popm pc
  80. .global __sys_fallocate
  81. .type __sys_fallocate,@function
  82. __sys_fallocate:
  83. pushm lr
  84. st.w --sp, ARG6
  85. call sys_fallocate
  86. sub sp, -4
  87. popm pc
  88. .global __sys_fanotify_mark
  89. .type __sys_fanotify_mark,@function
  90. __sys_fanotify_mark:
  91. pushm lr
  92. st.w --sp, ARG6
  93. call sys_fanotify_mark
  94. sub sp, -4
  95. popm pc
  96. .global __sys_process_vm_readv
  97. .type __sys_process_vm_readv,@function
  98. __sys_process_vm_readv:
  99. pushm lr
  100. st.w --sp, ARG6
  101. call sys_process_vm_readv
  102. sub sp, -4
  103. popm pc
  104. .global __sys_process_vm_writev
  105. .type __sys_process_vm_writev,@function
  106. __sys_process_vm_writev:
  107. pushm lr
  108. st.w --sp, ARG6
  109. call sys_process_vm_writev
  110. sub sp, -4
  111. popm pc