From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 5/6] KVM: x86 emulator: fix 'mov AL,moffs' instruction decoding Date: Tue, 06 Jul 2010 14:57:07 +0300 Message-ID: <4C331A13.4020202@redhat.com> References: <4C32EE01.5050408@cn.fujitsu.com> <4C32EF1B.7040709@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Wei Yongjun Return-path: Received: from mx1.redhat.com ([209.132.183.28]:21306 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755816Ab0GFL5L (ORCPT ); Tue, 6 Jul 2010 07:57:11 -0400 In-Reply-To: <4C32EF1B.7040709@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/06/2010 11:53 AM, Wei Yongjun wrote: > 'mov AL,moffs' do not need decode dest operand and > 'mov moffs,AL' do not need decode source operand. > > > @@ -177,8 +177,8 @@ static u32 opcode_table[256] = { > 0, 0, SrcImmFAddr | No64, 0, > ImplicitOps | Stack, ImplicitOps | Stack, 0, 0, > /* 0xA0 - 0xA7 */ > - ByteOp | DstReg | SrcMem | Mov | MemAbs, DstReg | SrcMem | Mov | MemAbs, > - ByteOp | DstMem | SrcReg | Mov | MemAbs, DstMem | SrcReg | Mov | MemAbs, > + ByteOp | SrcMem | Mov | MemAbs, SrcMem | Mov | MemAbs, > + ByteOp | DstMem | Mov | MemAbs, DstMem | Mov | MemAbs, > ByteOp | SrcSI | DstDI | Mov | String, SrcSI | DstDI | Mov | String, > ByteOp | SrcSI | DstDI | String, SrcSI | DstDI | String, > /* 0xA8 - 0xAF */ > Autotest rejected this patch (Windows XP fails to install). I think the reason is that without DstReg, op->type is not initialized and writeback fails. I dropped this patch. Suggest re-implementing with DstAcc and (new) SrcAcc. -- error compiling committee.c: too many arguments to function