syscall-stubs.S 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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_mmap2
  30. .type __sys_mmap2,@function
  31. __sys_mmap2:
  32. pushm lr
  33. st.w --sp, ARG6
  34. call sys_mmap_pgoff
  35. sub sp, -4
  36. popm pc
  37. .global __sys_sendto
  38. .type __sys_sendto,@function
  39. __sys_sendto:
  40. pushm lr
  41. st.w --sp, ARG6
  42. call sys_sendto
  43. sub sp, -4
  44. popm pc
  45. .global __sys_recvfrom
  46. .type __sys_recvfrom,@function
  47. __sys_recvfrom:
  48. pushm lr
  49. st.w --sp, ARG6
  50. call sys_recvfrom
  51. sub sp, -4
  52. popm pc
  53. .global __sys_pselect6
  54. .type __sys_pselect6,@function
  55. __sys_pselect6:
  56. pushm lr
  57. st.w --sp, ARG6
  58. call sys_pselect6
  59. sub sp, -4
  60. popm pc
  61. .global __sys_splice
  62. .type __sys_splice,@function
  63. __sys_splice:
  64. pushm lr
  65. st.w --sp, ARG6
  66. call sys_splice
  67. sub sp, -4
  68. popm pc
  69. .global __sys_epoll_pwait
  70. .type __sys_epoll_pwait,@function
  71. __sys_epoll_pwait:
  72. pushm lr
  73. st.w --sp, ARG6
  74. call sys_epoll_pwait
  75. sub sp, -4
  76. popm pc
  77. .global __sys_sync_file_range
  78. .type __sys_sync_file_range,@function
  79. __sys_sync_file_range:
  80. pushm lr
  81. st.w --sp, ARG6
  82. call sys_sync_file_range
  83. sub sp, -4
  84. popm pc