Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
3d9e77df
Commit
3d9e77df
authored
Aug 01, 2010
by
Avi Kivity
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KVM: x86 emulator: use SrcAcc to simplify xchg decoding
Signed-off-by:
Avi Kivity
<
avi@redhat.com
>
parent
45154539
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
arch/x86/kvm/emulate.c
arch/x86/kvm/emulate.c
+4
-11
No files found.
arch/x86/kvm/emulate.c
View file @
3d9e77df
...
@@ -2147,7 +2147,7 @@ static struct opcode opcode_table[256] = {
...
@@ -2147,7 +2147,7 @@ static struct opcode opcode_table[256] = {
D
(
DstMem
|
SrcNone
|
ModRM
|
Mov
),
D
(
ModRM
|
DstReg
),
D
(
DstMem
|
SrcNone
|
ModRM
|
Mov
),
D
(
ModRM
|
DstReg
),
D
(
ImplicitOps
|
SrcMem16
|
ModRM
),
G
(
0
,
group1A
),
D
(
ImplicitOps
|
SrcMem16
|
ModRM
),
G
(
0
,
group1A
),
/* 0x90 - 0x97 */
/* 0x90 - 0x97 */
X8
(
D
(
DstReg
)),
X8
(
D
(
SrcAcc
|
DstReg
)),
/* 0x98 - 0x9F */
/* 0x98 - 0x9F */
N
,
N
,
D
(
SrcImmFAddr
|
No64
),
N
,
N
,
N
,
D
(
SrcImmFAddr
|
No64
),
N
,
D
(
ImplicitOps
|
Stack
),
D
(
ImplicitOps
|
Stack
),
N
,
N
,
D
(
ImplicitOps
|
Stack
),
D
(
ImplicitOps
|
Stack
),
N
,
N
,
...
@@ -2932,16 +2932,9 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
...
@@ -2932,16 +2932,9 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
if
(
rc
!=
X86EMUL_CONTINUE
)
if
(
rc
!=
X86EMUL_CONTINUE
)
goto
done
;
goto
done
;
break
;
break
;
case
0x90
:
/* nop / xchg r8,rax */
case
0x90
...
0x97
:
/* nop / xchg reg, rax */
if
(
c
->
dst
.
addr
.
reg
==
&
c
->
regs
[
VCPU_REGS_RAX
])
{
if
(
c
->
dst
.
addr
.
reg
==
&
c
->
regs
[
VCPU_REGS_RAX
])
c
->
dst
.
type
=
OP_NONE
;
/* nop */
goto
done
;
break
;
}
case
0x91
...
0x97
:
/* xchg reg,rax */
c
->
src
.
type
=
OP_REG
;
c
->
src
.
bytes
=
c
->
op_bytes
;
c
->
src
.
addr
.
reg
=
&
c
->
regs
[
VCPU_REGS_RAX
];
c
->
src
.
val
=
*
(
c
->
src
.
addr
.
reg
);
goto
xchg
;
goto
xchg
;
case
0x9c
:
/* pushf */
case
0x9c
:
/* pushf */
c
->
src
.
val
=
(
unsigned
long
)
ctxt
->
eflags
;
c
->
src
.
val
=
(
unsigned
long
)
ctxt
->
eflags
;
...
...
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