From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49211 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKb2o-0008G4-31 for qemu-devel@nongnu.org; Fri, 04 Jun 2010 13:50:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKb2i-0005Ac-Vc for qemu-devel@nongnu.org; Fri, 04 Jun 2010 13:50:57 -0400 Received: from mail.codesourcery.com ([38.113.113.100]:36082) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKb2i-0005AL-NX for qemu-devel@nongnu.org; Fri, 04 Jun 2010 13:50:52 -0400 Date: Fri, 4 Jun 2010 10:50:51 -0700 From: Nathan Froyd Subject: Re: [Qemu-devel] [PATCH 03/10] target-mips: add enum constants for various invocations of FOP Message-ID: <20100604175050.GG19235@codesourcery.com> References: <1274717984-25887-1-git-send-email-froydnj@codesourcery.com> <1274717984-25887-4-git-send-email-froydnj@codesourcery.com> <4C093BBC.6060509@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C093BBC.6060509@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org, aurelien@aurel32.net On Fri, Jun 04, 2010 at 10:45:32AM -0700, Richard Henderson wrote: > On 05/24/2010 09:19 AM, Nathan Froyd wrote: > > @@ -5937,8 +6031,8 @@ static void gen_farith (DisasContext *ctx, uint32_t op1, > > enum { BINOP, CMPOP, OTHEROP } optype = OTHEROP; > > uint32_t func = ctx->opcode & 0x3f; > > > > - switch (ctx->opcode & FOP(0x3f, 0x1f)) { > > - case FOP(0, 16): > > + switch (opc) { > > + case OPC_ADD_S: > > For instance, "opc" would seem to be a good candidate for a variable > to be switched to the enumeration type. > > ... Except that I can't seem to find the definition of "opc" at this > point in patch 3? It looks like the argument "op1" should be what's > used here. Is this a case of patches being split incorrectly? This is indeed supposed to be op1; the typo gets fixed in patch 6. What's the benefit from declaring op1 as 'enum fopcode' or similar? -Nathan