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
e9251b05
Commit
e9251b05
authored
25 years ago
by
Ove Kåven
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improved shortcuts - follows jumps in trying to avoid switching to
real mode unnecessarily.
parent
a73b4278
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
+20
-0
20 additions, 0 deletions
msdos/dpmi.c
with
20 additions
and
0 deletions
msdos/dpmi.c
+
20
−
0
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
);
...
...
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