Re: [Qemu-devel] [PATCH] target-arm: use clz32() instead of a for loop

2009-10-23 Thread Aurelien Jarno
Stuart Brady a écrit : > On Fri, Oct 23, 2009 at 09:04:53AM +0200, Aurelien Jarno wrote: >> Stuart Brady a écrit : >>> Just a quick note that the implementation of clz, ctz and popcnt is >>> still listed in the TCG TODO list. The last time I looked, I noticed >>> that quite a few architectures hav

Re: [Qemu-devel] [PATCH] target-arm: use clz32() instead of a for loop

2009-10-23 Thread Stuart Brady
On Fri, Oct 23, 2009 at 09:04:53AM +0200, Aurelien Jarno wrote: > Stuart Brady a écrit : > > Just a quick note that the implementation of clz, ctz and popcnt is > > still listed in the TCG TODO list. The last time I looked, I noticed > > that quite a few architectures have clz/ctz instructions: >

Re: [Qemu-devel] [PATCH] target-arm: use clz32() instead of a for loop

2009-10-23 Thread Aurelien Jarno
Stuart Brady a écrit : > On Thu, Oct 15, 2009 at 11:14:52PM +0200, Aurelien Jarno wrote: >> @@ -394,10 +395,7 @@ uint32_t HELPER(uxtb16)(uint32_t x) >> >> uint32_t HELPER(clz)(uint32_t x) >> { >> -int count; >> -for (count = 32; x; count--) >> -x >>= 1; >> -return count; >>

Re: [Qemu-devel] [PATCH] target-arm: use clz32() instead of a for loop

2009-10-22 Thread Stuart Brady
On Thu, Oct 15, 2009 at 11:14:52PM +0200, Aurelien Jarno wrote: > @@ -394,10 +395,7 @@ uint32_t HELPER(uxtb16)(uint32_t x) > > uint32_t HELPER(clz)(uint32_t x) > { > -int count; > -for (count = 32; x; count--) > -x >>= 1; > -return count; > +return clz32(x); > } > >

Re: [Qemu-devel] [PATCH] target-arm: use clz32() instead of a for loop

2009-10-18 Thread Laurent Desnogues
On Thu, Oct 15, 2009 at 11:14 PM, Aurelien Jarno wrote: > Signed-off-by: Aurelien Jarno > --- >  target-arm/helper.c |    6 ++ >  1 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/target-arm/helper.c b/target-arm/helper.c > index 701629a..656b5df 100644 > --- a/target-arm/help