Re: [Qemu-devel] [PATCH 03/10] target-mips: add enum constants for various invocations of FOP

2010-06-04 Thread Richard Henderson
On 06/04/2010 10:50 AM, Nathan Froyd wrote: > What's the benefit from declaring op1 as 'enum fopcode' or similar? Debugging and self-documentation. r~

Re: [Qemu-devel] [PATCH 03/10] target-mips: add enum constants for various invocations of FOP

2010-06-04 Thread Nathan Froyd
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 & 0

Re: [Qemu-devel] [PATCH 03/10] target-mips: add enum constants for various invocations of FOP

2010-06-04 Thread Richard Henderson
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,

[Qemu-devel] [PATCH 03/10] target-mips: add enum constants for various invocations of FOP

2010-05-24 Thread Nathan Froyd
Tweak gen_farith and its caller to use them. Signed-off-by: Nathan Froyd --- target-mips/translate.c | 266 --- 1 files changed, 180 insertions(+), 86 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 2075d09..2568e16

[Qemu-devel] [PATCH 03/10] target-mips: add enum constants for various invocations of FOP

2010-05-20 Thread Nathan Froyd
Tweak gen_farith and its caller to use them. Signed-off-by: Nathan Froyd --- target-mips/translate.c | 266 --- 1 files changed, 180 insertions(+), 86 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 2075d09..2568e16