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
Releases
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
Felix Münchhalfen
wine
Commits
9d9e0606
Commit
9d9e0606
authored
26 years ago
by
Marcus Meissner
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Emulate (well, ignore) mov cr0,eax and mov eax,cr0.
parent
ea1640fc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
miscemu/instr.c
+40
-18
40 additions, 18 deletions
miscemu/instr.c
with
40 additions
and
18 deletions
miscemu/instr.c
+
40
−
18
View file @
9d9e0606
...
...
@@ -411,24 +411,46 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
case
0x0f
:
/* extended instruction */
switch
(
instr
[
1
])
{
case
0x20
:
/* mov cr4, eax */
if
(
instr
[
2
]
!=
0xe0
)
break
;
/* CR4 register . See linux/arch/i386/mm/init.c, X86_CR4_ defs
* bit 0: VME Virtual Mode Exception ?
* bit 1: PVI Protected mode Virtual Interrupt
* bit 2: TSD Timestamp disable
* bit 3: DE Debugging extensions
* bit 4: PSE Page size extensions
* bit 5: PAE Physical address extension
* bit 6: MCE Machine check enable
* bit 7: PGE Enable global pages
* bit 8: PCE Enable performance counters at IPL3
*/
fprintf
(
stderr
,
"mov cr4,eax at 0x%08lx
\n
"
,
EIP_sig
(
context
));
EAX_sig
(
context
)
=
0
;
EIP_sig
(
context
)
+=
prefixlen
+
3
;
return
TRUE
;
case
0x22
:
/* mov eax, crX */
switch
(
instr
[
2
])
{
case
0xc0
:
fprintf
(
stderr
,
"mov eax,cr0 at 0x%08lx, EAX=0x%08lx
\n
"
,
EIP_sig
(
context
),
EAX_sig
(
context
)
);
EIP_sig
(
context
)
+=
prefixlen
+
3
;
return
TRUE
;
default:
break
;
/*fallthrough to bad instruction handling */
}
break
;
/*fallthrough to bad instruction handling */
case
0x20
:
/* mov crX, eax */
switch
(
instr
[
2
])
{
case
0xe0
:
/* mov cr4, eax */
/* CR4 register . See linux/arch/i386/mm/init.c, X86_CR4_ defs
* bit 0: VME Virtual Mode Exception ?
* bit 1: PVI Protected mode Virtual Interrupt
* bit 2: TSD Timestamp disable
* bit 3: DE Debugging extensions
* bit 4: PSE Page size extensions
* bit 5: PAE Physical address extension
* bit 6: MCE Machine check enable
* bit 7: PGE Enable global pages
* bit 8: PCE Enable performance counters at IPL3
*/
fprintf
(
stderr
,
"mov cr4,eax at 0x%08lx
\n
"
,
EIP_sig
(
context
));
EAX_sig
(
context
)
=
0
;
EIP_sig
(
context
)
+=
prefixlen
+
3
;
return
TRUE
;
case
0xc0
:
/* mov cr0, eax */
fprintf
(
stderr
,
"mov cr0,eax at 0x%08lx
\n
"
,
EIP_sig
(
context
));
EAX_sig
(
context
)
=
0x10
;
/* FIXME: set more bits ? */
EIP_sig
(
context
)
+=
prefixlen
+
3
;
return
TRUE
;
default:
/* fallthrough to illegal instruction */
break
;
}
/* fallthrough to illegal instruction */
break
;
#ifdef FS_sig
case
0xa1
:
/* pop fs */
{
...
...
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