Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e9251b05
Commit
e9251b05
authored
May 17, 1999
by
Ove Kaaven
Committed by
Alexandre Julliard
May 17, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved shortcuts - follows jumps in trying to avoid switching to
real mode unnecessarily.
parent
a73b4278
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
dpmi.c
msdos/dpmi.c
+20
-0
No files found.
msdos/dpmi.c
View file @
e9251b05
...
...
@@ -270,6 +270,7 @@ int DPMI_CallRMProc( CONTEXT *context, LPWORD stack, int args, int iret )
NE_MODULE
*
pModule
=
pTask
?
NE_GetPtr
(
pTask
->
hModule
)
:
NULL
;
RMCB
*
CurrRMCB
;
int
alloc
=
0
,
already
=
0
;
BYTE
*
code
;
GlobalUnlock16
(
GetCurrentTask
()
);
...
...
@@ -281,6 +282,25 @@ int DPMI_CallRMProc( CONTEXT *context, LPWORD stack, int args, int iret )
callrmproc_again:
/* there might be some code that just jumps to RMCBs or the like,
in which case following the jumps here might get us to a shortcut */
code
=
CTX_SEG_OFF_TO_LIN
(
context
,
CS_reg
(
context
),
EIP_reg
(
context
));
switch
(
*
code
)
{
case
0xe9
:
/* JMP NEAR */
IP_reg
(
context
)
+=
3
+
*
(
WORD
*
)(
code
+
1
);
/* yeah, I know these gotos don't look good... */
goto
callrmproc_again
;
case
0xea
:
/* JMP FAR */
IP_reg
(
context
)
=
*
(
WORD
*
)(
code
+
1
);
CS_reg
(
context
)
=
*
(
WORD
*
)(
code
+
3
);
/* ...but since the label is there anyway... */
goto
callrmproc_again
;
case
0xeb
:
/* JMP SHORT */
IP_reg
(
context
)
+=
2
+
*
(
signed
char
*
)(
code
+
1
);
/* ...because of other gotos below, so... */
goto
callrmproc_again
;
}
/* shortcut for chaining to internal interrupt handlers */
if
((
CS_reg
(
context
)
==
0xF000
)
&&
iret
)
{
return
INT_RealModeInterrupt
(
IP_reg
(
context
)
/
4
,
context
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment