syscall-stubs.S 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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_sigaltstack
  20. .type __sys_sigaltstack,@function
  21. __sys_sigaltstack:
  22. mov r10, sp
  23. rjmp sys_sigaltstack
  24. .global __sys_rt_sigreturn
  25. .type __sys_rt_sigreturn,@function
  26. __sys_rt_sigreturn:
  27. mov r12, sp
  28. rjmp sys_rt_sigreturn
  29. .global __sys_fork
  30. .type __sys_fork,@function
  31. __sys_fork:
  32. mov r12, sp
  33. rjmp sys_fork
  34. .global __sys_clone
  35. .type __sys_clone,@function
  36. __sys_clone:
  37. mov r8, sp
  38. rjmp sys_clone
  39. .global __sys_vfork
  40. .type __sys_vfork,@function
  41. __sys_vfork:
  42. mov r12, sp
  43. rjmp sys_vfork
  44. .global __sys_execve
  45. .type __sys_execve,@function
  46. __sys_execve:
  47. mov r9, sp
  48. rjmp sys_execve
  49. .global __sys_mmap2
  50. .type __sys_mmap2,@function
  51. __sys_mmap2:
  52. pushm lr
  53. st.w --sp, ARG6
  54. call sys_mmap_pgoff
  55. sub sp, -4
  56. popm pc
  57. .global __sys_sendto
  58. .type __sys_sendto,@function
  59. __sys_sendto:
  60. pushm lr
  61. st.w --sp, ARG6
  62. call sys_sendto
  63. sub sp, -4
  64. popm pc
  65. .global __sys_recvfrom
  66. .type __sys_recvfrom,@function
  67. __sys_recvfrom:
  68. pushm lr
  69. st.w --sp, ARG6
  70. call sys_recvfrom
  71. sub sp, -4
  72. popm pc
  73. .global __sys_pselect6
  74. .type __sys_pselect6,@function
  75. __sys_pselect6:
  76. pushm lr
  77. st.w --sp, ARG6
  78. call sys_pselect6
  79. sub sp, -4
  80. popm pc
  81. .global __sys_splice
  82. .type __sys_splice,@function
  83. __sys_splice:
  84. pushm lr
  85. st.w --sp, ARG6
  86. call sys_splice
  87. sub sp, -4
  88. popm pc
  89. .global __sys_epoll_pwait
  90. .type __sys_epoll_pwait,@function
  91. __sys_epoll_pwait:
  92. pushm lr
  93. st.w --sp, ARG6
  94. call sys_epoll_pwait
  95. sub sp, -4
  96. popm pc
  97. .global __sys_sync_file_range
  98. .type __sys_sync_file_range,@function
  99. __sys_sync_file_range:
  100. pushm lr
  101. st.w --sp, ARG6
  102. call sys_sync_file_range
  103. sub sp, -4
  104. popm pc