krnl386.exe16: Avoid the DOSVM_HardwareInterruptPM() forward declaration.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2018-02-22 15:13:47 +01:00 committed by Alexandre Julliard
parent 8259f383f6
commit a52b257d56
2 changed files with 43 additions and 44 deletions

View File

@ -275,7 +275,6 @@ extern void __wine_call_int_handler( CONTEXT *, BYTE ) DECLSPEC_HIDDEN;
extern void DOSVM_CallBuiltinHandler( CONTEXT *, BYTE ) DECLSPEC_HIDDEN;
extern BOOL DOSVM_EmulateInterruptPM( CONTEXT *, BYTE ) DECLSPEC_HIDDEN;
extern FARPROC16 DOSVM_GetPMHandler16( BYTE ) DECLSPEC_HIDDEN;
extern void DOSVM_HardwareInterruptPM( CONTEXT *, BYTE ) DECLSPEC_HIDDEN;
extern void DOSVM_SetPMHandler16( BYTE, FARPROC16 ) DECLSPEC_HIDDEN;
/* ioports.c */

View File

@ -177,6 +177,49 @@ static void DOSVM_PushFlags( CONTEXT *context, BOOL islong, BOOL isstub )
}
/**********************************************************************
* DOSVM_HardwareInterruptPM
*
* Emulate call to interrupt handler in 16-bit or 32-bit protected mode.
*
* Pushes interrupt frame to stack and changes instruction
* pointer to interrupt handler.
*/
void DOSVM_HardwareInterruptPM( CONTEXT *context, BYTE intnum )
{
FARPROC16 addr = DOSVM_GetPMHandler16( intnum );
if (SELECTOROF(addr) == DOSVM_dpmi_segments->int16_sel)
{
TRACE( "builtin interrupt %02x has been invoked "
"(through vector %02x)\n",
OFFSETOF(addr)/DOSVM_STUB_PM16, intnum );
if (intnum == 0x25 || intnum == 0x26)
DOSVM_PushFlags( context, FALSE, FALSE );
DOSVM_BuildCallFrame( context,
DOSVM_IntProcRelay,
DOSVM_GetBuiltinHandler(
OFFSETOF(addr)/DOSVM_STUB_PM16 ) );
}
else
{
TRACE( "invoking hooked interrupt %02x at %04x:%04x\n",
intnum, SELECTOROF(addr), OFFSETOF(addr) );
/* Push the flags and return address on the stack */
PUSH_WORD16( context, LOWORD(context->EFlags) );
PUSH_WORD16( context, context->SegCs );
PUSH_WORD16( context, LOWORD(context->Eip) );
/* Jump to the interrupt handler */
context->SegCs = HIWORD(addr);
context->Eip = LOWORD(addr);
}
}
/**********************************************************************
* DOSVM_EmulateInterruptPM
*
@ -243,49 +286,6 @@ BOOL DOSVM_EmulateInterruptPM( CONTEXT *context, BYTE intnum )
}
/**********************************************************************
* DOSVM_HardwareInterruptPM
*
* Emulate call to interrupt handler in 16-bit or 32-bit protected mode.
*
* Pushes interrupt frame to stack and changes instruction
* pointer to interrupt handler.
*/
void DOSVM_HardwareInterruptPM( CONTEXT *context, BYTE intnum )
{
FARPROC16 addr = DOSVM_GetPMHandler16( intnum );
if (SELECTOROF(addr) == DOSVM_dpmi_segments->int16_sel)
{
TRACE( "builtin interrupt %02x has been invoked "
"(through vector %02x)\n",
OFFSETOF(addr)/DOSVM_STUB_PM16, intnum );
if (intnum == 0x25 || intnum == 0x26)
DOSVM_PushFlags( context, FALSE, FALSE );
DOSVM_BuildCallFrame( context,
DOSVM_IntProcRelay,
DOSVM_GetBuiltinHandler(
OFFSETOF(addr)/DOSVM_STUB_PM16 ) );
}
else
{
TRACE( "invoking hooked interrupt %02x at %04x:%04x\n",
intnum, SELECTOROF(addr), OFFSETOF(addr) );
/* Push the flags and return address on the stack */
PUSH_WORD16( context, LOWORD(context->EFlags) );
PUSH_WORD16( context, context->SegCs );
PUSH_WORD16( context, LOWORD(context->Eip) );
/* Jump to the interrupt handler */
context->SegCs = HIWORD(addr);
context->Eip = LOWORD(addr);
}
}
/**********************************************************************
* DOSVM_GetPMHandler16
*