Currently the mmio_operands assumes writing to memory when operand 0 is

register or immediate, this is false for cmp/test opcode.
This patch resolve this problem, please review.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Jun Nakajima  <jun.nakajima@intel.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-09-28 13:49:33 +01:00
1 parent 817fbb6432
commit 69f773c572
1 file changed
+9 -5
+9 -5
View File
@@ -833,12 +833,16 @@ void handle_mmio(unsigned long va, unsigned long gpa)
mmio_operands(IOREQ_TYPE_XOR, gpa, &mmio_inst, mpcip, regs);
break;
case INSTR_CMP:
mmio_operands(IOREQ_TYPE_COPY, gpa, &mmio_inst, mpcip, regs);
break;
case INSTR_CMP: /* Pass through */
case INSTR_TEST:
mmio_operands(IOREQ_TYPE_COPY, gpa, &mmio_inst, mpcip, regs);
mpcip->flags = mmio_inst.flags;
mpcip->instr = mmio_inst.instr;
mpcip->operand[0] = mmio_inst.operand[0]; /* source */
mpcip->operand[1] = mmio_inst.operand[1]; /* destination */
mpcip->immediate = mmio_inst.immediate;
/* send the request and wait for the value */
send_mmio_req(IOREQ_TYPE_COPY, gpa, 1, mmio_inst.op_size, 0, IOREQ_READ, 0);
break;
default:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.