asm_linux_mipsx.s 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. // +build linux
  6. // +build mips mipsle
  7. // +build gc
  8. #include "textflag.h"
  9. //
  10. // System calls for mips, Linux
  11. //
  12. // Just jump to package syscall's implementation for all these functions.
  13. // The runtime may know about them.
  14. TEXT ·Syscall(SB),NOSPLIT,$0-28
  15. JMP syscall·Syscall(SB)
  16. TEXT ·Syscall6(SB),NOSPLIT,$0-40
  17. JMP syscall·Syscall6(SB)
  18. TEXT ·Syscall9(SB),NOSPLIT,$0-52
  19. JMP syscall·Syscall9(SB)
  20. TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
  21. JAL runtime·entersyscall(SB)
  22. MOVW a1+4(FP), R4
  23. MOVW a2+8(FP), R5
  24. MOVW a3+12(FP), R6
  25. MOVW R0, R7
  26. MOVW trap+0(FP), R2 // syscall entry
  27. SYSCALL
  28. MOVW R2, r1+16(FP) // r1
  29. MOVW R3, r2+20(FP) // r2
  30. JAL runtime·exitsyscall(SB)
  31. RET
  32. TEXT ·RawSyscall(SB),NOSPLIT,$0-28
  33. JMP syscall·RawSyscall(SB)
  34. TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
  35. JMP syscall·RawSyscall6(SB)
  36. TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
  37. MOVW a1+4(FP), R4
  38. MOVW a2+8(FP), R5
  39. MOVW a3+12(FP), R6
  40. MOVW trap+0(FP), R2 // syscall entry
  41. SYSCALL
  42. MOVW R2, r1+16(FP)
  43. MOVW R3, r2+20(FP)
  44. RET