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
61429142
Commit
61429142
authored
Aug 19, 2010
by
Avi Kivity
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KVM: x86 emulator: implement CWD (opcode 99)
Signed-off-by:
Avi Kivity
<
avi@redhat.com
>
parent
d46164db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
arch/x86/kvm/emulate.c
arch/x86/kvm/emulate.c
+14
-1
No files found.
arch/x86/kvm/emulate.c
View file @
61429142
...
...
@@ -2280,6 +2280,18 @@ static int em_imul_3op(struct x86_emulate_ctxt *ctxt)
return
em_imul
(
ctxt
);
}
static
int
em_cwd
(
struct
x86_emulate_ctxt
*
ctxt
)
{
struct
decode_cache
*
c
=
&
ctxt
->
decode
;
c
->
dst
.
type
=
OP_REG
;
c
->
dst
.
bytes
=
c
->
src
.
bytes
;
c
->
dst
.
addr
.
reg
=
&
c
->
regs
[
VCPU_REGS_RDX
];
c
->
dst
.
val
=
~
((
c
->
src
.
val
>>
(
c
->
src
.
bytes
*
8
-
1
))
-
1
);
return
X86EMUL_CONTINUE
;
}
static
int
em_rdtsc
(
struct
x86_emulate_ctxt
*
ctxt
)
{
unsigned
cpl
=
ctxt
->
ops
->
cpl
(
ctxt
->
vcpu
);
...
...
@@ -2425,7 +2437,8 @@ static struct opcode opcode_table[256] = {
/* 0x90 - 0x97 */
X8
(
D
(
SrcAcc
|
DstReg
)),
/* 0x98 - 0x9F */
D
(
DstAcc
|
SrcNone
),
N
,
D
(
SrcImmFAddr
|
No64
),
N
,
D
(
DstAcc
|
SrcNone
),
I
(
ImplicitOps
|
SrcAcc
,
em_cwd
),
D
(
SrcImmFAddr
|
No64
),
N
,
D
(
ImplicitOps
|
Stack
),
D
(
ImplicitOps
|
Stack
),
N
,
N
,
/* 0xA0 - 0xA7 */
D
(
ByteOp
|
DstAcc
|
SrcMem
|
Mov
|
MemAbs
),
D
(
DstAcc
|
SrcMem
|
Mov
|
MemAbs
),
...
...
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