You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.2 KiB

  1. // Copyright 2022 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. //go:build linux && loong64 && gc
  5. // +build linux
  6. // +build loong64
  7. // +build gc
  8. #include "textflag.h"
  9. // Just jump to package syscall's implementation for all these functions.
  10. // The runtime may know about them.
  11. TEXT ·Syscall(SB),NOSPLIT,$0-56
  12. JMP syscall·Syscall(SB)
  13. TEXT ·Syscall6(SB),NOSPLIT,$0-80
  14. JMP syscall·Syscall6(SB)
  15. TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
  16. JAL runtime·entersyscall(SB)
  17. MOVV a1+8(FP), R4
  18. MOVV a2+16(FP), R5
  19. MOVV a3+24(FP), R6
  20. MOVV R0, R7
  21. MOVV R0, R8
  22. MOVV R0, R9
  23. MOVV trap+0(FP), R11 // syscall entry
  24. SYSCALL
  25. MOVV R4, r1+32(FP)
  26. MOVV R0, r2+40(FP) // r2 is not used. Always set to 0
  27. JAL runtime·exitsyscall(SB)
  28. RET
  29. TEXT ·RawSyscall(SB),NOSPLIT,$0-56
  30. JMP syscall·RawSyscall(SB)
  31. TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
  32. JMP syscall·RawSyscall6(SB)
  33. TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
  34. MOVV a1+8(FP), R4
  35. MOVV a2+16(FP), R5
  36. MOVV a3+24(FP), R6
  37. MOVV R0, R7
  38. MOVV R0, R8
  39. MOVV R0, R9
  40. MOVV trap+0(FP), R11 // syscall entry
  41. SYSCALL
  42. MOVV R4, r1+32(FP)
  43. MOVV R0, r2+40(FP) // r2 is not used. Always set to 0
  44. RET