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.

asm_linux_loong64.s 1.2KB

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