Commit c04ec839 authored by Takuya Yoshikawa's avatar Takuya Yoshikawa Committed by Avi Kivity

KVM: x86 emulator: Use opcode::execute for Group 4/5 instructions

Group 4: FE
Group 5: FF
Signed-off-by: default avatarTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent c15af35f
...@@ -3213,16 +3213,19 @@ static struct opcode group3[] = { ...@@ -3213,16 +3213,19 @@ static struct opcode group3[] = {
}; };
static struct opcode group4[] = { static struct opcode group4[] = {
D(ByteOp | DstMem | SrcNone | ModRM | Lock), D(ByteOp | DstMem | SrcNone | ModRM | Lock), I(ByteOp | DstMem | SrcNone | ModRM | Lock, em_grp45),
I(ByteOp | DstMem | SrcNone | ModRM | Lock, em_grp45),
N, N, N, N, N, N, N, N, N, N, N, N,
}; };
static struct opcode group5[] = { static struct opcode group5[] = {
D(DstMem | SrcNone | ModRM | Lock), D(DstMem | SrcNone | ModRM | Lock), I(DstMem | SrcNone | ModRM | Lock, em_grp45),
D(SrcMem | ModRM | Stack), I(DstMem | SrcNone | ModRM | Lock, em_grp45),
I(SrcMem | ModRM | Stack, em_grp45),
I(SrcMemFAddr | ModRM | ImplicitOps | Stack, em_call_far), I(SrcMemFAddr | ModRM | ImplicitOps | Stack, em_call_far),
D(SrcMem | ModRM | Stack), D(SrcMemFAddr | ModRM | ImplicitOps), I(SrcMem | ModRM | Stack, em_grp45),
D(SrcMem | ModRM | Stack), N, I(SrcMemFAddr | ModRM | ImplicitOps, em_grp45),
I(SrcMem | ModRM | Stack, em_grp45), N,
}; };
static struct opcode group6[] = { static struct opcode group6[] = {
...@@ -4082,12 +4085,6 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt) ...@@ -4082,12 +4085,6 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
case 0xfd: /* std */ case 0xfd: /* std */
ctxt->eflags |= EFLG_DF; ctxt->eflags |= EFLG_DF;
break; break;
case 0xfe: /* Grp4 */
rc = em_grp45(ctxt);
break;
case 0xff: /* Grp5 */
rc = em_grp45(ctxt);
break;
default: default:
goto cannot_emulate; goto cannot_emulate;
} }
......
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