asm_linux_arm64.s 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright 2015 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build linux
  5. // +build arm64
  6. // +build !gccgo
  7. #include "textflag.h"
  8. // Just jump to package syscall's implementation for all these functions.
  9. // The runtime may know about them.
  10. TEXT ·Syscall(SB),NOSPLIT,$0-56
  11. B syscall·Syscall(SB)
  12. TEXT ·Syscall6(SB),NOSPLIT,$0-80
  13. B syscall·Syscall6(SB)
  14. TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
  15. BL runtime·entersyscall(SB)
  16. MOVD a1+8(FP), R0
  17. MOVD a2+16(FP), R1
  18. MOVD a3+24(FP), R2
  19. MOVD $0, R3
  20. MOVD $0, R4
  21. MOVD $0, R5
  22. MOVD trap+0(FP), R8 // syscall entry
  23. SVC
  24. MOVD R0, r1+32(FP) // r1
  25. MOVD R1, r2+40(FP) // r2
  26. BL runtime·exitsyscall(SB)
  27. RET
  28. TEXT ·RawSyscall(SB),NOSPLIT,$0-56
  29. B syscall·RawSyscall(SB)
  30. TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
  31. B syscall·RawSyscall6(SB)
  32. TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
  33. MOVD a1+8(FP), R0
  34. MOVD a2+16(FP), R1
  35. MOVD a3+24(FP), R2
  36. MOVD $0, R3
  37. MOVD $0, R4
  38. MOVD $0, R5
  39. MOVD trap+0(FP), R8 // syscall entry
  40. SVC
  41. MOVD R0, r1+32(FP)
  42. MOVD R1, r2+40(FP)
  43. RET