Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215667
b: refs/heads/master
c: 7f9b4b7
h: refs/heads/master
i:
  215665: cc3daaf
  215663: f653f36
v: v3
  • Loading branch information
Avi Kivity committed Oct 24, 2010
1 parent 77d2758 commit 275a7ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e87e3efe764285133866a14ddc71cf211f022c2
refs/heads/master: 7f9b4b75be866de938a3094413a60554f7e66e4d
8 changes: 8 additions & 0 deletions trunk/arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
#define Group (1<<14) /* Bits 3:5 of modrm byte extend opcode */
#define GroupDual (1<<15) /* Alternate decoding of mod == 3 */
/* Misc flags */
#define Op3264 (1<<24) /* Operand is 64b in long mode, 32b otherwise */
#define Undefined (1<<25) /* No Such Instruction */
#define Lock (1<<26) /* lock prefix is allowed for the instruction */
#define Priv (1<<27) /* instruction generates #GP if current CPL != 0 */
Expand Down Expand Up @@ -2406,6 +2407,13 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt)
if (mode == X86EMUL_MODE_PROT64 && (c->d & Stack))
c->op_bytes = 8;

if (c->d & Op3264) {
if (mode == X86EMUL_MODE_PROT64)
c->op_bytes = 8;
else
c->op_bytes = 4;
}

/* ModRM and SIB bytes. */
if (c->d & ModRM) {
rc = decode_modrm(ctxt, ops);
Expand Down

0 comments on commit 275a7ea

Please sign in to comment.