Skip to content
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

Optimize use of uc_context_save/restore #12

Open
andreiw opened this issue Mar 22, 2023 · 0 comments
Open

Optimize use of uc_context_save/restore #12

andreiw opened this issue Mar 22, 2023 · 0 comments

Comments

@andreiw
Copy link
Contributor

andreiw commented Mar 22, 2023

Technically these should only be needed if the previous context was interrupted. If the last context was in a native call, we should be able to get away with saving/restoring minimal state as per calling convention (RBX, RBP, RDI, RSI, RSP, R12, R13, R14, R15, and XMM6-XMM15)

Seems like a fairly minor optimization, as realistically there won't be giant chains of emu->native->emu invocations, while event handling would still involve a full context save (akin to an interrupt handler, really).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant