syscall-stubs.S 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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_mmap2
  45. .type __sys_mmap2,@function
  46. __sys_mmap2:
  47. pushm lr
  48. st.w --sp, ARG6
  49. call sys_mmap_pgoff
  50. sub sp, -4
  51. popm pc
  52. .global __sys_sendto
  53. .type __sys_sendto,@function
  54. __sys_sendto:
  55. pushm lr
  56. st.w --sp, ARG6
  57. call sys_sendto
  58. sub sp, -4
  59. popm pc
  60. .global __sys_recvfrom
  61. .type __sys_recvfrom,@function
  62. __sys_recvfrom:
  63. pushm lr
  64. st.w --sp, ARG6
  65. call sys_recvfrom
  66. sub sp, -4
  67. popm pc
  68. .global __sys_pselect6
  69. .type __sys_pselect6,@function
  70. __sys_pselect6:
  71. pushm lr
  72. st.w --sp, ARG6
  73. call sys_pselect6
  74. sub sp, -4
  75. popm pc
  76. .global __sys_splice
  77. .type __sys_splice,@function
  78. __sys_splice:
  79. pushm lr
  80. st.w --sp, ARG6
  81. call sys_splice
  82. sub sp, -4
  83. popm pc
  84. .global __sys_epoll_pwait
  85. .type __sys_epoll_pwait,@function
  86. __sys_epoll_pwait:
  87. pushm lr
  88. st.w --sp, ARG6
  89. call sys_epoll_pwait
  90. sub sp, -4
  91. popm pc
  92. .global __sys_sync_file_range
  93. .type __sys_sync_file_range,@function
  94. __sys_sync_file_range:
  95. pushm lr
  96. st.w --sp, ARG6
  97. call sys_sync_file_range
  98. sub sp, -4
  99. popm pc