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_mipsx.s 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright 2016 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 && (mips || mipsle) && gc
  5. #include "textflag.h"
  6. //
  7. // System calls for mips, Linux
  8. //
  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-28
  12. JMP syscall·Syscall(SB)
  13. TEXT ·Syscall6(SB),NOSPLIT,$0-40
  14. JMP syscall·Syscall6(SB)
  15. TEXT ·Syscall9(SB),NOSPLIT,$0-52
  16. JMP syscall·Syscall9(SB)
  17. TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
  18. JAL runtime·entersyscall(SB)
  19. MOVW a1+4(FP), R4
  20. MOVW a2+8(FP), R5
  21. MOVW a3+12(FP), R6
  22. MOVW R0, R7
  23. MOVW trap+0(FP), R2 // syscall entry
  24. SYSCALL
  25. MOVW R2, r1+16(FP) // r1
  26. MOVW R3, r2+20(FP) // r2
  27. JAL runtime·exitsyscall(SB)
  28. RET
  29. TEXT ·RawSyscall(SB),NOSPLIT,$0-28
  30. JMP syscall·RawSyscall(SB)
  31. TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
  32. JMP syscall·RawSyscall6(SB)
  33. TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
  34. MOVW a1+4(FP), R4
  35. MOVW a2+8(FP), R5
  36. MOVW a3+12(FP), R6
  37. MOVW trap+0(FP), R2 // syscall entry
  38. SYSCALL
  39. MOVW R2, r1+16(FP)
  40. MOVW R3, r2+20(FP)
  41. RET