Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yoann Laissus
wine
Commits
2325ee40
Commit
2325ee40
authored
24 years ago
by
Ove Kåven
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use MZ_Current() instead of pModule->lpDosTask. Cleaned up the RMCB32
assembly code a bit, and wrapped it in #ifdef __i386__.
parent
946a4448
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
msdos/dpmi.c
+9
-10
9 additions, 10 deletions
msdos/dpmi.c
with
9 additions
and
10 deletions
msdos/dpmi.c
+
9
−
10
View file @
2325ee40
...
...
@@ -10,12 +10,10 @@
#include
"wine/winbase16.h"
#include
"ldt.h"
#include
"global.h"
#include
"module.h"
#include
"miscemu.h"
#include
"msdos.h"
#include
"dosexe.h"
#include
"task.h"
#include
"thread.h"
/* for !MZ_SUPPORTED */
#include
"stackframe.h"
/* for !MZ_SUPPORTED */
#include
"toolhelp.h"
#include
"selectors.h"
#include
"process.h"
...
...
@@ -183,6 +181,8 @@ static void INT_SetRealModeContext( REALMODECALL *call, CONTEXT86 *context )
call
->
ss
=
SS_reg
(
context
);
}
#ifdef __i386__
void
DPMI_CallRMCB32
(
RMCB
*
rmcb
,
UINT16
ss
,
DWORD
esp
,
UINT16
*
es
,
DWORD
*
edi
)
#if 0 /* original code, which early gccs puke on */
{
...
...
@@ -211,7 +211,6 @@ void DPMI_CallRMCB32(RMCB *rmcb, UINT16 ss, DWORD esp, UINT16*es, DWORD*edi)
__ASM_GLOBAL_FUNC
(
DPMI_CallRMCB32
,
"pushl %ebp
\n\t
"
"movl %esp,%ebp
\n\t
"
"subl $0x10,%esp
\n\t
"
"pushl %edi
\n\t
"
"pushl %esi
\n\t
"
"movl 0x8(%ebp),%eax
\n\t
"
...
...
@@ -220,7 +219,6 @@ __ASM_GLOBAL_FUNC(DPMI_CallRMCB32,
"movl 0x10(%eax),%ecx
\n\t
"
"movl 0xc(%eax),%edi
\n\t
"
"addl $0x4,%eax
\n\t
"
"movl %eax,-0x8(%ebp)
\n\t
"
"pushl %ebp
\n\t
"
"pushl %ebx
\n\t
"
"pushl %es
\n\t
"
...
...
@@ -244,6 +242,8 @@ __ASM_GLOBAL_FUNC(DPMI_CallRMCB32,
"ret"
)
#endif
#endif
/* __i386__ */
/**********************************************************************
* DPMI_CallRMCBProc
*
...
...
@@ -307,8 +307,7 @@ int DPMI_CallRMProc( CONTEXT86 *context, LPWORD stack, int args, int iret )
{
LPWORD
stack16
;
LPVOID
addr
=
NULL
;
/* avoid gcc warning */
TDB
*
pTask
=
(
TDB
*
)
GlobalLock16
(
GetCurrentTask
()
);
NE_MODULE
*
pModule
=
pTask
?
NE_GetPtr
(
pTask
->
hModule
)
:
NULL
;
LPDOSTASK
lpDosTask
=
MZ_Current
();
RMCB
*
CurrRMCB
;
int
alloc
=
0
,
already
=
0
;
BYTE
*
code
;
...
...
@@ -353,11 +352,11 @@ callrmproc_again:
while
(
CurrRMCB
&&
(
HIWORD
(
CurrRMCB
->
address
)
!=
CS_reg
(
context
)))
CurrRMCB
=
CurrRMCB
->
next
;
if
(
!
(
CurrRMCB
||
pModule
->
lpDosTask
))
{
if
(
!
(
CurrRMCB
||
lpDosTask
))
{
#ifdef MZ_SUPPORTED
FIXME
(
"DPMI real-mode call using DOS VM task system, not fully tested!
\n
"
);
TRACE
(
"creating VM86 task
\n
"
);
if
(
!
MZ_InitTask
(
MZ_AllocDPMITask
()
))
{
if
(
!
MZ_InitTask
(
lpDosTask
=
MZ_AllocDPMITask
()
))
{
ERR
(
"could not setup VM86 task
\n
"
);
return
1
;
}
...
...
@@ -397,7 +396,7 @@ callrmproc_again:
if
(
CurrRMCB
)
{
/* RMCB call, invoke protected-mode handler directly */
DPMI_CallRMCBProc
(
context
,
CurrRMCB
,
pModule
->
lpDosTask
?
pModule
->
lpDosTask
->
dpmi_flag
:
0
);
DPMI_CallRMCBProc
(
context
,
CurrRMCB
,
lpDosTask
?
lpDosTask
->
dpmi_flag
:
0
);
/* check if we returned to where we thought we would */
if
((
CS_reg
(
context
)
!=
DPMI_wrap_seg
)
||
(
LOWORD
(
EIP_reg
(
context
))
!=
0
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment