github.com/sitano/gsysint@v0.0.0-20190607084937-69a4f3233e4e/g/asm_amd64.s (about)

     1  #include "textflag.h"
     2  #include "go_asm_amd64.h"
     3  
     4  #define	get_tls(r)	MOVQ TLS, r
     5  #define	g(r)	0(r)(TLS*1)
     6  
     7  TEXT ·GetG(SB),NOSPLIT,$0-8
     8  	get_tls(CX)
     9  	MOVQ	g(CX), AX
    10  	MOVQ	AX, gp+0(FP)
    11  	RET
    12  
    13  TEXT ·GetM(SB),NOSPLIT,$0-8
    14  	get_tls(CX)
    15  	MOVQ	g(CX), AX
    16  	MOVQ	g_m(AX), BX
    17  	MOVQ	BX, mp+0(FP)
    18  	RET