KVM: x86 emulator: add a new "implied 1" Src decode type
Add SrcOne operand type when we need to decode an implied '1' like with regular shift instruction Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
0dc8d10f7d
commit
bfcadf83ec
|
@ -58,6 +58,7 @@
|
||||||
#define SrcMem32 (4<<4) /* Memory operand (32-bit). */
|
#define SrcMem32 (4<<4) /* Memory operand (32-bit). */
|
||||||
#define SrcImm (5<<4) /* Immediate operand. */
|
#define SrcImm (5<<4) /* Immediate operand. */
|
||||||
#define SrcImmByte (6<<4) /* 8-bit sign-extended immediate operand. */
|
#define SrcImmByte (6<<4) /* 8-bit sign-extended immediate operand. */
|
||||||
|
#define SrcOne (7<<4) /* Implied '1' */
|
||||||
#define SrcMask (7<<4)
|
#define SrcMask (7<<4)
|
||||||
/* Generic ModRM decode. */
|
/* Generic ModRM decode. */
|
||||||
#define ModRM (1<<7)
|
#define ModRM (1<<7)
|
||||||
|
@ -1004,6 +1005,10 @@ done_prefixes:
|
||||||
c->src.bytes = 1;
|
c->src.bytes = 1;
|
||||||
c->src.val = insn_fetch(s8, 1, c->eip);
|
c->src.val = insn_fetch(s8, 1, c->eip);
|
||||||
break;
|
break;
|
||||||
|
case SrcOne:
|
||||||
|
c->src.bytes = 1;
|
||||||
|
c->src.val = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue