mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:12:58 +00:00
WIP [NTOS] Fix handling of non-volatiles in trap vs exception frame
This commit is contained in:
parent
7f2ed4d02f
commit
048db88043
2 changed files with 10 additions and 7 deletions
|
@ -36,11 +36,11 @@ KeContextToTrapFrame(IN PCONTEXT Context,
|
|||
if (ContextFlags & CONTEXT_INTEGER)
|
||||
{
|
||||
TrapFrame->Rax = Context->Rax;
|
||||
TrapFrame->Rbx = Context->Rbx;
|
||||
//TrapFrame->Rbx = Context->Rbx;
|
||||
TrapFrame->Rcx = Context->Rcx;
|
||||
TrapFrame->Rdx = Context->Rdx;
|
||||
TrapFrame->Rsi = Context->Rsi;
|
||||
TrapFrame->Rdi = Context->Rdi;
|
||||
//TrapFrame->Rsi = Context->Rsi;
|
||||
//TrapFrame->Rdi = Context->Rdi;
|
||||
TrapFrame->Rbp = Context->Rbp;
|
||||
TrapFrame->R8 = Context->R8;
|
||||
TrapFrame->R9 = Context->R9;
|
||||
|
@ -48,6 +48,9 @@ KeContextToTrapFrame(IN PCONTEXT Context,
|
|||
TrapFrame->R11 = Context->R11;
|
||||
if (ExceptionFrame)
|
||||
{
|
||||
ExceptionFrame->Rbx = Context->Rbx;
|
||||
ExceptionFrame->Rsi = Context->Rsi;
|
||||
ExceptionFrame->Rdi = Context->Rdi;
|
||||
ExceptionFrame->R12 = Context->R12;
|
||||
ExceptionFrame->R13 = Context->R13;
|
||||
ExceptionFrame->R14 = Context->R14;
|
||||
|
|
|
@ -57,7 +57,7 @@ MACRO(EnterTrap, Flags)
|
|||
lea rbp, [rsp]
|
||||
.setframe rbp, 0
|
||||
|
||||
if (Flags AND TF_NONVOLATILES)
|
||||
if (Flags AND TF_NONVOLATILES) // ???
|
||||
/* Save non-volatile registers */
|
||||
mov [rbp + KTRAP_FRAME_Rbx], rbx
|
||||
.savereg rbx, KTRAP_FRAME_Rbx
|
||||
|
@ -228,9 +228,9 @@ kernel_mode_return:
|
|||
|
||||
if (Flags AND TF_NONVOLATILES)
|
||||
/* Restore non-volatile registers */
|
||||
mov rbx, [rbp + KTRAP_FRAME_Rbx]
|
||||
mov rdi, [rbp + KTRAP_FRAME_Rdi]
|
||||
mov rsi, [rbp + KTRAP_FRAME_Rsi]
|
||||
//mov rbx, [rbp + KTRAP_FRAME_Rbx]
|
||||
//mov rdi, [rbp + KTRAP_FRAME_Rdi]
|
||||
//mov rsi, [rbp + KTRAP_FRAME_Rsi]
|
||||
endif
|
||||
|
||||
if (Flags AND TF_VOLATILES)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue