direct-io.hg

changeset 11661:e5cdebf9d8ef

[VMXASSIST] Fix data32/addr32 instruction decode issue.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
author kfraser@localhost.localdomain
date Fri Sep 29 11:11:49 2006 +0100 (2006-09-29)
parents 058f4a2a8642
children 80388aea02a1
files tools/firmware/vmxassist/vm86.c
line diff
     1.1 --- a/tools/firmware/vmxassist/vm86.c	Fri Sep 29 11:10:14 2006 +0100
     1.2 +++ b/tools/firmware/vmxassist/vm86.c	Fri Sep 29 11:11:49 2006 +0100
     1.3 @@ -1412,12 +1412,14 @@ opcode(struct regs *regs)
     1.4  			{
     1.5  				int addr, data;
     1.6  				int seg = segment(prefix, regs, regs->vds);
     1.7 +				int offset = prefix & ADDR32? fetch32(regs) : fetch16(regs);
     1.8 +
     1.9  				if (prefix & DATA32) {
    1.10 -					addr = address(regs, seg, fetch32(regs));
    1.11 +					addr = address(regs, seg, offset);
    1.12  					data = read32(addr);
    1.13  					setreg32(regs, 0, data);
    1.14  				} else {
    1.15 -					addr = address(regs, seg, fetch16(regs));
    1.16 +					addr = address(regs, seg, offset);
    1.17  					data = read16(addr);
    1.18  					setreg16(regs, 0, data);
    1.19  				}