usb-ks

USB Killswitch
git clone git://git.laack.co/usb-ks.git
Log | Files | Refs | README | LICENSE

asm_linux_amd64.s (1217B)


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