-
Notifications
You must be signed in to change notification settings - Fork 276
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
Support OSX, the ST thread and stack model #11
Comments
The asm code:
which save RSP, the stack address to rdx, then save rdx to jmpbuf[JB_RSP]. |
The asm code:
which save the content of RSP, that is the previous function address(PC), to rax, then save rax to jmpbuf[JB_PC]. |
winlinvip
added a commit
that referenced
this issue
Mar 28, 2020
winlinvip
referenced
this issue
in winlinvip/srs
Mar 28, 2020
winlinvip
changed the title
ST thread and stack model
Support OSX, the ST thread and stack model
Jul 29, 2021
Closed
寄存器布局,osx和linux是一样的,参考:https://en.wikipedia.org/wiki/X86_calling_conventions
由于save和restore最多只有两个参数:
因此,我们可以将其他的参数寄存器当作临时变量用,比如存储RSP和PC的内容:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Analysis ST thread model, for mac
__amd64__
or__x86_64__
.The text was updated successfully, but these errors were encountered: