-
Notifications
You must be signed in to change notification settings - Fork 183
arm64架构下可以使用x10寄存器? #181
New issue
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
Comments
@sleepsheeps 你在哪看到的文档? |
@sleepsheeps 主要是因为超过10个64bit参数的函数较少,当然不排除有。 不过你提到的这个确实可能是一个缺陷,即不应该使用 下面的例子展示了 package main
import "fmt"
//go:noinline
func test11Args(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,a11 int) int {
return a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10 + a11
}
func main() {
result := test11Args(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
fmt.Println(result)
} GOARCH=arm64 go build -gcflags="-N -l" -o __debug ./
GOARCH=arm64 go tool objdump -s "main.main" __debug
|
@sleepsheeps 为什么你会提出这个问题?有什么特别的场景吗? |
没有的,我最近也在研究go的热更,只是有这个疑问想问一下的。 |
有什么想法吗? gomonkey最大的问题是不线程安全。 我之前也有类似的想法,之前基于dlv做了一个尝试: xhd2015/delve#3 问题在于dlv依靠断点来暂停程序,太慢了。 后来,基于-exec/-overlay尝试了一下,目前只能函数拦截,但是做不到完全替换. https://github.com/xhd2015/xgo 不过,我觉得热更新应该可以用这种思路实现。可能需要加个锁或者gc stop world |
刚开始研究还没有想法呢。我也觉得不安全,但是老板还是要这么搞。 |
看了go文档并没有说明可以用x10寄存器当作临时寄存器使用,想问一下选择x10寄存器的依据是什么呢?
The text was updated successfully, but these errors were encountered: