From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] x86 emulator: Add call near absolute instruction (group5: opcode 0xff mod r/m 2) Date: Tue, 09 Sep 2008 17:51:03 +0300 Message-ID: <48C68D57.9020105@qumranet.com> References: <20080908184719.GB31824@mohd-laptop> <20080909091622.7cbb4ff5@frecb000711> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Mohammed Gamal , kvm@vger.kernel.org To: Guillaume Thouvenin Return-path: Received: from il.qumranet.com ([212.179.150.194]:57176 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbYIIOvF (ORCPT ); Tue, 9 Sep 2008 10:51:05 -0400 In-Reply-To: <20080909091622.7cbb4ff5@frecb000711> Sender: kvm-owner@vger.kernel.org List-ID: Guillaume Thouvenin wrote: > - case 0x38 ... 0x3d: > + case 0x38 ... 0x3b: > cmp: /* cmp */ > emulate_2op_SrcV("cmp", c->src, c->dst, ctxt->eflags); > break; > + case 0x3c ... 0x3d: /* cmp al imm8 or ax imm16 or eax imm32 */ > + c->dst.type = OP_REG; > + c->dst.bytes = c->op_bytes; > + c->dst.ptr = &c->regs[VCPU_REGS_RAX]; > + if (c->op_bytes == 1) > + c->dst.val = *(u8 *)c->dst.ptr; > + else if (c->op_bytes == 2) > + c->dst.val = *(u16 *)c->dst.ptr; > + else > + c->dst.val = *(u32 *)c->dst.ptr; > + c->dst.orig_val = c->dst.val; > + goto cmp; > SrcAcc would remove the need for this change. -- error compiling committee.c: too many arguments to function