MultiArchUefiPkg icon indicating copy to clipboard operation
MultiArchUefiPkg copied to clipboard

Optimize use of uc_context_save/restore

Open andreiw opened this issue 2 years ago • 0 comments

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).

andreiw avatar Mar 22 '23 05:03 andreiw