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: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 03/10] target-mips: add enum constants for various invocations of FOP
Date: Fri, 04 Jun 2010 10:45:32 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Thunderbird/3.0.4

On 05/24/2010 09:19 AM, Nathan Froyd wrote:
> +enum {
> +    OPC_ADD_S = FOP(0, FMT_S),

Adding the enumeration is good.  Naming the enumeration and using it
in appropriate places is even better.

> @@ -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?



r~



reply via email to

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