From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC] Patch - Big real mode emulation Date: Wed, 21 May 2008 17:10:52 +0300 Message-ID: <48342D6C.3040200@qumranet.com> References: <20080521113410.43ec182f@frecb000711.frec.bull.fr> <48342AD2.40406@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Anthony Liguori , Mohammed Gamal , "Kamble, Nitin A" , Alexander Graf , Marcelo Tosatti To: Guillaume Thouvenin Return-path: Received: from bzq-179-150-194.static.bezeqint.net ([212.179.150.194]:34704 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757579AbYEUOKy (ORCPT ); Wed, 21 May 2008 10:10:54 -0400 In-Reply-To: <48342AD2.40406@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: >> @@ -1342,6 +1346,10 @@ special_insn: >> switch (c->b) { >> case 0x00 ... 0x05: >> add: /* add */ >> + if ((c->d & ModRM) && c->modrm_mod == 3) { >> + c->dst.bytes = (c->d & ByteOp) ? 1 : c->op_bytes; >> + c->dst.ptr = decode_register(c->modrm_rm, c->regs, c->d & ByteOp); >> + } > > This is not specific to the add instruction. We really need to switch > decode_modrm() to decode into a struct operand. > Btw, I see that the decoder already handles this (see DstMem decoding for the case where mod == 3). Is this code really needed now? -- error compiling committee.c: too many arguments to function