qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 03/10] target-mips: add enum constants for vario


From: Nathan Froyd
Subject: Re: [Qemu-devel] [PATCH 03/10] target-mips: add enum constants for various invocations of FOP
Date: Fri, 4 Jun 2010 10:50:51 -0700
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]