1// Example assembly copied from https://github.com/rpccloud/goid 2 3#include "go_asm.h" 4#include "textflag.h" 5 6#ifdef GOARCH_386 7#define get_tls(r) MOVL TLS, r 8#define g(r) 0(r)(TLS*1) 9#endif 10 11TEXT ·getg(SB), NOSPLIT, $0-4 12 get_tls(CX) 13 MOVL g(CX), AX 14 MOVL AX, ret+0(FP) 15 RET 16