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
57e4e608
Commit
57e4e608
authored
Jan 20, 2011
by
Gerald Pfeifer
Committed by
Alexandre Julliard
Jan 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Remove variable sep and related code from INSTR_GetOperandAddr.
parent
670c8503
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
21 deletions
+9
-21
instr.c
dlls/ntoskrnl.exe/instr.c
+9
-21
No files found.
dlls/ntoskrnl.exe/instr.c
View file @
57e4e608
...
...
@@ -106,7 +106,7 @@ static void store_reg( CONTEXT *context, BYTE regmodrm, const BYTE *addr, int lo
static
BYTE
*
INSTR_GetOperandAddr
(
CONTEXT
*
context
,
BYTE
*
instr
,
int
long_addr
,
int
segprefix
,
int
*
len
)
{
int
mod
,
rm
,
base
=
0
,
index
=
0
,
ss
=
0
,
seg
=
0
,
off
;
int
mod
,
rm
,
base
=
0
,
index
=
0
,
ss
=
0
,
off
;
#define GET_VAL(val,type) \
{ *val = *(type *)instr; instr += sizeof(type); *len += sizeof(type); }
...
...
@@ -154,14 +154,14 @@ static BYTE *INSTR_GetOperandAddr( CONTEXT *context, BYTE *instr,
switch
(
rm
)
{
case
0
:
base
=
context
->
Eax
;
seg
=
context
->
SegDs
;
break
;
case
1
:
base
=
context
->
Ecx
;
seg
=
context
->
SegDs
;
break
;
case
2
:
base
=
context
->
Edx
;
seg
=
context
->
SegDs
;
break
;
case
3
:
base
=
context
->
Ebx
;
seg
=
context
->
SegDs
;
break
;
case
4
:
base
=
context
->
Esp
;
seg
=
context
->
SegSs
;
break
;
case
5
:
base
=
context
->
Ebp
;
seg
=
context
->
SegSs
;
break
;
case
6
:
base
=
context
->
Esi
;
seg
=
context
->
SegDs
;
break
;
case
7
:
base
=
context
->
Edi
;
seg
=
context
->
SegDs
;
break
;
case
0
:
base
=
context
->
Eax
;
break
;
case
1
:
base
=
context
->
Ecx
;
break
;
case
2
:
base
=
context
->
Edx
;
break
;
case
3
:
base
=
context
->
Ebx
;
break
;
case
4
:
base
=
context
->
Esp
;
break
;
case
5
:
base
=
context
->
Ebp
;
break
;
case
6
:
base
=
context
->
Esi
;
break
;
case
7
:
base
=
context
->
Edi
;
break
;
}
switch
(
mod
)
{
...
...
@@ -169,7 +169,6 @@ static BYTE *INSTR_GetOperandAddr( CONTEXT *context, BYTE *instr,
if
(
rm
==
5
)
/* special case: ds:(disp32) */
{
GET_VAL
(
&
base
,
DWORD
);
seg
=
context
->
SegDs
;
}
break
;
...
...
@@ -190,35 +189,27 @@ static BYTE *INSTR_GetOperandAddr( CONTEXT *context, BYTE *instr,
{
case
0
:
/* ds:(bx,si) */
base
=
LOWORD
(
context
->
Ebx
)
+
LOWORD
(
context
->
Esi
);
seg
=
context
->
SegDs
;
break
;
case
1
:
/* ds:(bx,di) */
base
=
LOWORD
(
context
->
Ebx
)
+
LOWORD
(
context
->
Edi
);
seg
=
context
->
SegDs
;
break
;
case
2
:
/* ss:(bp,si) */
base
=
LOWORD
(
context
->
Ebp
)
+
LOWORD
(
context
->
Esi
);
seg
=
context
->
SegSs
;
break
;
case
3
:
/* ss:(bp,di) */
base
=
LOWORD
(
context
->
Ebp
)
+
LOWORD
(
context
->
Edi
);
seg
=
context
->
SegSs
;
break
;
case
4
:
/* ds:(si) */
base
=
LOWORD
(
context
->
Esi
);
seg
=
context
->
SegDs
;
break
;
case
5
:
/* ds:(di) */
base
=
LOWORD
(
context
->
Edi
);
seg
=
context
->
SegDs
;
break
;
case
6
:
/* ss:(bp) */
base
=
LOWORD
(
context
->
Ebp
);
seg
=
context
->
SegSs
;
break
;
case
7
:
/* ds:(bx) */
base
=
LOWORD
(
context
->
Ebx
);
seg
=
context
->
SegDs
;
break
;
}
...
...
@@ -228,7 +219,6 @@ static BYTE *INSTR_GetOperandAddr( CONTEXT *context, BYTE *instr,
if
(
rm
==
6
)
/* special case: ds:(disp16) */
{
GET_VAL
(
&
base
,
WORD
);
seg
=
context
->
SegDs
;
}
break
;
...
...
@@ -244,8 +234,6 @@ static BYTE *INSTR_GetOperandAddr( CONTEXT *context, BYTE *instr,
}
base
&=
0xffff
;
}
if
(
segprefix
!=
-
1
)
seg
=
segprefix
;
/* FIXME: we assume that all segments have a base of 0 */
return
(
BYTE
*
)(
base
+
(
index
<<
ss
));
#undef GET_VAL
...
...
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