From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/8] Simplify byte/word opcode pair decode Date: Mon, 23 Aug 2010 16:48:10 +0300 Message-ID: <4C727C1A.3080204@redhat.com> References: <1282561577-24491-1-git-send-email-avi@redhat.com> <4C7277AE.3040102@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1261 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753193Ab0HWNsN (ORCPT ); Mon, 23 Aug 2010 09:48:13 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7NDmB70026010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 23 Aug 2010 09:48:12 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7NDmBmU020691 for ; Mon, 23 Aug 2010 09:48:11 -0400 In-Reply-To: <4C7277AE.3040102@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/23/2010 04:29 PM, Paolo Bonzini wrote: > On 08/23/2010 01:06 PM, Avi Kivity wrote: >> Many x86 instructions come in pairs - byte and word variants where bit 0 >> of the opcode determines operand size. Use this to simplify the decode >> tables. > > Many actually come in quadruples, bit 0 is the size and bit 1 says > which of ModRM and REG is the destination. > > example: > > D2bv(DstMem | SrcReg | ModRM | Lock), D2bv(DstReg | SrcMem | ModRM), > Right. We can't exploit those yet. I'd like to make operand encoding regular (same bit definitions for Src, Dst, and Src2) which would allow us to do this (and have a decode_operand() and fetch_operand() instead of the current three switches). -- error compiling committee.c: too many arguments to function