Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0c13ef1 authored by Gleb Natapov's avatar Gleb Natapov Committed by Avi Kivity
Browse files

KVM: x86 emulator: cleanup xchg emulation



Dst operand is already initialized during decoding stage. No need to
reinitialize.

Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 054fe9f6
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2804,8 +2804,8 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
			break;
			break;
		}
		}
	case 0x91 ... 0x97: /* xchg reg,rax */
	case 0x91 ... 0x97: /* xchg reg,rax */
		c->src.type = c->dst.type = OP_REG;
		c->src.type = OP_REG;
		c->src.bytes = c->dst.bytes = c->op_bytes;
		c->src.bytes = c->op_bytes;
		c->src.ptr = (unsigned long *) &c->regs[VCPU_REGS_RAX];
		c->src.ptr = (unsigned long *) &c->regs[VCPU_REGS_RAX];
		c->src.val = *(c->src.ptr);
		c->src.val = *(c->src.ptr);
		goto xchg;
		goto xchg;