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.
 
 

59 lines
1.2 KiB

  1. // Copyright 2009 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 gc
  5. // +build gc
  6. #include "textflag.h"
  7. //
  8. // System calls for AMD64, Linux
  9. //
  10. // Just jump to package syscall's implementation for all these functions.
  11. // The runtime may know about them.
  12. TEXT ·Syscall(SB),NOSPLIT,$0-56
  13. JMP syscall·Syscall(SB)
  14. TEXT ·Syscall6(SB),NOSPLIT,$0-80
  15. JMP syscall·Syscall6(SB)
  16. TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
  17. CALL runtime·entersyscall(SB)
  18. MOVQ a1+8(FP), DI
  19. MOVQ a2+16(FP), SI
  20. MOVQ a3+24(FP), DX
  21. MOVQ $0, R10
  22. MOVQ $0, R8
  23. MOVQ $0, R9
  24. MOVQ trap+0(FP), AX // syscall entry
  25. SYSCALL
  26. MOVQ AX, r1+32(FP)
  27. MOVQ DX, r2+40(FP)
  28. CALL runtime·exitsyscall(SB)
  29. RET
  30. TEXT ·RawSyscall(SB),NOSPLIT,$0-56
  31. JMP syscall·RawSyscall(SB)
  32. TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
  33. JMP syscall·RawSyscall6(SB)
  34. TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
  35. MOVQ a1+8(FP), DI
  36. MOVQ a2+16(FP), SI
  37. MOVQ a3+24(FP), DX
  38. MOVQ $0, R10
  39. MOVQ $0, R8
  40. MOVQ $0, R9
  41. MOVQ trap+0(FP), AX // syscall entry
  42. SYSCALL
  43. MOVQ AX, r1+32(FP)
  44. MOVQ DX, r2+40(FP)
  45. RET
  46. TEXT ·gettimeofday(SB),NOSPLIT,$0-16
  47. JMP syscall·gettimeofday(SB)