Commit 8744aa9a authored by Mohammed Gamal's avatar Mohammed Gamal Committed by Avi Kivity

KVM: x86 emulator: Add stc instruction (opcode 0xf9)

Signed-off-by: default avatarMohammed Gamal <m.gamal005@gmail.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent c034da8b
...@@ -2269,7 +2269,7 @@ static struct opcode opcode_table[256] = { ...@@ -2269,7 +2269,7 @@ static struct opcode opcode_table[256] = {
N, N, N, N, N, N, N, N,
D(ImplicitOps | Priv), D(ImplicitOps), G(ByteOp, group3), G(0, group3), D(ImplicitOps | Priv), D(ImplicitOps), G(ByteOp, group3), G(0, group3),
/* 0xF8 - 0xFF */ /* 0xF8 - 0xFF */
D(ImplicitOps), N, D(ImplicitOps), D(ImplicitOps), D(ImplicitOps), D(ImplicitOps), D(ImplicitOps), D(ImplicitOps),
D(ImplicitOps), D(ImplicitOps), G(0, group4), G(0, group5), D(ImplicitOps), D(ImplicitOps), G(0, group4), G(0, group5),
}; };
...@@ -3124,6 +3124,9 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt) ...@@ -3124,6 +3124,9 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
case 0xf8: /* clc */ case 0xf8: /* clc */
ctxt->eflags &= ~EFLG_CF; ctxt->eflags &= ~EFLG_CF;
break; break;
case 0xf9: /* stc */
ctxt->eflags |= EFLG_CF;
break;
case 0xfa: /* cli */ case 0xfa: /* cli */
if (emulator_bad_iopl(ctxt, ops)) { if (emulator_bad_iopl(ctxt, ops)) {
emulate_gp(ctxt, 0); emulate_gp(ctxt, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment