diff --git a/reactos/hal/halx86/generic/i386/trap.S b/reactos/hal/halx86/generic/i386/trap.S index 8a4f4538144..d0e1c6cf1b5 100644 --- a/reactos/hal/halx86/generic/i386/trap.S +++ b/reactos/hal/halx86/generic/i386/trap.S @@ -24,7 +24,7 @@ PUBLIC @HalpExitToV86@4 @HalpExitToV86@4: /* Point esp to the iret frame and return */ lea esp, [ecx + KTRAP_FRAME_EIP] - iret + iretd /* Here starts the real mode code */ .code16 diff --git a/reactos/ntoskrnl/include/internal/i386/asmmacro.S b/reactos/ntoskrnl/include/internal/i386/asmmacro.S index 920885be86a..82fd8f1582b 100644 --- a/reactos/ntoskrnl/include/internal/i386/asmmacro.S +++ b/reactos/ntoskrnl/include/internal/i386/asmmacro.S @@ -343,7 +343,7 @@ PUBLIC @&Name&@4 elseif (Flags AND KI_EXIT_IRET) /* Return with iret */ - iret + iretd elseif (Flags AND KI_EXIT_JMP) diff --git a/reactos/ntoskrnl/include/internal/i386/ke.h b/reactos/ntoskrnl/include/internal/i386/ke.h index 7aa98846ca5..595cf46be37 100644 --- a/reactos/ntoskrnl/include/internal/i386/ke.h +++ b/reactos/ntoskrnl/include/internal/i386/ke.h @@ -644,12 +644,13 @@ KiSystemCallTrampoline(IN PVOID Handler, { mov ecx, StackBytes mov edx, Arguments + mov ebx, Handler sub esp, ecx mov edi, esp mov esi, edx shr ecx, 2 rep movsd - call Handler + call ebx mov Result, eax } #else @@ -803,7 +804,7 @@ KiIret(VOID) #elif defined(_MSC_VER) __asm { - iret + iretd } #else #error Unsupported compiler diff --git a/reactos/ntoskrnl/kdbg/i386/kdb_help.S b/reactos/ntoskrnl/kdbg/i386/kdb_help.S index e586f14c5e7..9884c66e1c5 100644 --- a/reactos/ntoskrnl/kdbg/i386/kdb_help.S +++ b/reactos/ntoskrnl/kdbg/i386/kdb_help.S @@ -116,7 +116,7 @@ _KdbEnter: /* * Return to the caller. */ - iret + iretd PUBLIC _KdbpStackSwitchAndCall@8