We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/cch123/golang-notes/blob/master/assembly.md#%E5%9C%B0%E5%9D%80%E8%BF%90%E7%AE%97 这个地方不是很明白。另外,movq也有Scale的概念吗,比如下面的代码。
#define g(r) 0(r)(TLS*1) get_tls(CX) MOVQ g(CX), AX
展开后是 movq 0(CX)(TLS*1),AX 这是什么鬼?
movq 0(CX)(TLS*1),AX
The text was updated successfully, but these errors were encountered:
sorry,之前没 watch 这个仓库,问题都没看到哈
scale 其实就是个乘数,go 的编译器在编译这段的时候有个判断:
// parseScale converts a decimal string into a valid scale factor. func (p *Parser) parseScale(s string) int8 { switch s { case "1", "2", "4", "8": return int8(s[0] - '0') } p.errorf("bad scale: %s", s) return 0 }
这个 scale 是判断寄存器表达式里面有 * 号的时候,才会去看 scale 对不对
Sorry, something went wrong.
至于第二个问题,应该是和线程本地存储的 TLS 机制相关,这个我没细研究哈哈 这两行是参考 runtime 里的代码来的
No branches or pull requests
https://github.com/cch123/golang-notes/blob/master/assembly.md#%E5%9C%B0%E5%9D%80%E8%BF%90%E7%AE%97
这个地方不是很明白。另外,movq也有Scale的概念吗,比如下面的代码。
展开后是
movq 0(CX)(TLS*1),AX
这是什么鬼?
The text was updated successfully, but these errors were encountered: