$ go version
go version go1.12.7 darwin/amd64
$ uname -a
Darwin WudeMacBook-Pro.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 
25 23:16:27 PDT 2019;RELEASE_X86_64 x86_64

I read a asm code segment recently, it look like this:

mov   %fs:-8, %RCX               // load G descriptor from TLS
cmp   16(%RCX), %RSP
jbe      morestack

How do I know mov %fs:-8, %RCX is load G descriptor from TLS ? 

When I learn about the runtime package, I find that MOVQ $0x123, g(BX) in 
asm_amd64.s. It is disass like this, mov qword ptr gs:[0x30], 0x123 when I 
using delve. I figure that they may be the same question. But I am not sure 
about this



-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/e1eea9d5-934a-4fca-8dc0-be42d541b3c7%40googlegroups.com.

Reply via email to