asm_linux_mipsx.s 1.1 KB

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