openbsd-ports/emulators/wine/patches/patch-msdos_dpmi_c
2007-10-26 21:04:25 +00:00

49 lines
1.6 KiB
Plaintext

$OpenBSD: patch-msdos_dpmi_c,v 1.1 2007/10/26 21:04:25 ajacoutot Exp $
--- msdos/dpmi.c.orig Thu Feb 25 18:32:56 1999
+++ msdos/dpmi.c Fri Oct 26 22:55:04 2007
@@ -20,6 +20,7 @@
#include "process.h"
#include "callback.h"
#include "debug.h"
+#include "stackframe.h"
#define DOS_GET_DRIVE(reg) ((reg) ? (reg) - 1 : DRIVE_GetCurrentDrive())
@@ -211,22 +212,24 @@ static void DPMI_CallRMCBProc( CONTEXT *context, RMCB
* real-mode call structure. */
if (flag & 1) {
/* 32-bit DPMI client */
- __asm__ __volatile__("
- pushl %%es
- pushl %%ds
- pushfl
- movl %4,%%es
- movl %3,%%ds
- lcall %2
- popl %%ds
- movl %%es,%0
- popl %%es
- "
+ __asm__ __volatile__("\n"
+" pushl %%si\n"
+" pushl %%es\n"
+" pushl %%ds\n"
+" pushfl\n"
+" movl %4,%%es\n"
+" movl %3,%%ds\n"
+" lcall %2\n"
+" popl %%ds\n"
+" movl %%es,%0\n"
+" popl %%es\n"
+" popl %%si\n"
+" "
: "=g" (es), "=D" (edi)
: "m" (rmcb->proc_ofs),
"g" (ss), "g" (rmcb->regs_sel),
"S" (ESP_reg(context)), "D" (rmcb->regs_ofs)
- : "eax", "ecx", "edx", "esi", "ebp" );
+ : "eax", "ecx", "edx", "ebp" );
} else {
/* 16-bit DPMI client */
CONTEXT ctx = *context;