github.com/egonelbre/exp@v0.0.0-20240430123955-ed1d3aa93911/sync2/runtime2/goid_amd64.s (about)

     1  // +build go1.10
     2  
     3  #include "textflag.h"
     4  #include "go_asm.h"
     5  #include "go_tls.go110.h"
     6  
     7  // func GOID() int64
     8  TEXT ·GOID(SB),NOSPLIT,$0-8
     9  	get_tls(CX)
    10  	MOVQ	g(CX), DX
    11  	MOVQ    G_ID_OFFSET(DX), AX
    12  	MOVQ	AX, ret+0(FP)
    13  	RET
    14  
    15  // func g() uintptr
    16  TEXT ·g(SB),NOSPLIT,$0-8
    17  	get_tls(CX)
    18  	MOVQ	g(CX), BX
    19  	MOVQ	BX, ret+0(FP)
    20  	RET