From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzWdH-0002bB-QS for qemu-devel@nongnu.org; Sun, 18 Oct 2009 10:21:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzWdH-0002aq-9t for qemu-devel@nongnu.org; Sun, 18 Oct 2009 10:21:15 -0400 Received: from [199.232.76.173] (port=54518 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzWdH-0002am-5T for qemu-devel@nongnu.org; Sun, 18 Oct 2009 10:21:15 -0400 Received: from fg-out-1718.google.com ([72.14.220.152]:5931) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MzWdG-0006y3-Tx for qemu-devel@nongnu.org; Sun, 18 Oct 2009 10:21:15 -0400 Received: by fg-out-1718.google.com with SMTP id 16so136185fgg.10 for ; Sun, 18 Oct 2009 07:21:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20091015211452.GC7071@volta.aurel32.net> References: <20091015211452.GC7071@volta.aurel32.net> Date: Sun, 18 Oct 2009 16:21:13 +0200 Message-ID: <761ea48b0910180721q6de006d6u738f0d5024716c4e@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] target-arm: use clz32() instead of a for loop From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org On Thu, Oct 15, 2009 at 11:14 PM, Aurelien Jarno wro= te: > Signed-off-by: Aurelien Jarno > --- > =A0target-arm/helper.c | =A0 =A06 ++---- > =A01 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/helper.c > +++ b/target-arm/helper.c > @@ -7,6 +7,7 @@ > =A0#include "gdbstub.h" > =A0#include "helpers.h" > =A0#include "qemu-common.h" > +#include "host-utils.h" > > =A0static uint32_t cortexa8_cp15_c0_c1[8] =3D > =A0{ 0x1031, 0x11, 0x400, 0, 0x31100003, 0x20000000, 0x01202000, 0x11 }; > @@ -394,10 +395,7 @@ uint32_t HELPER(uxtb16)(uint32_t x) > > =A0uint32_t HELPER(clz)(uint32_t x) > =A0{ > - =A0 =A0int count; > - =A0 =A0for (count =3D 32; x; count--) > - =A0 =A0 =A0 =A0x >>=3D 1; > - =A0 =A0return count; > + =A0 =A0return clz32(x); > =A0} > > =A0int32_t HELPER(sdiv)(int32_t num, int32_t den) > -- > 1.6.1.3 Acked-by: Laurent Desnogues