From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] target-arm: use clz32() instead of a for loop
Date: Thu, 15 Oct 2009 23:14:52 +0200 [thread overview]
Message-ID: <20091015211452.GC7071@volta.aurel32.net> (raw)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
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/helper.c
+++ b/target-arm/helper.c
@@ -7,6 +7,7 @@
#include "gdbstub.h"
#include "helpers.h"
#include "qemu-common.h"
+#include "host-utils.h"
static uint32_t cortexa8_cp15_c0_c1[8] =
{ 0x1031, 0x11, 0x400, 0, 0x31100003, 0x20000000, 0x01202000, 0x11 };
@@ -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);
}
int32_t HELPER(sdiv)(int32_t num, int32_t den)
--
1.6.1.3
next reply other threads:[~2009-10-15 21:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 21:14 Aurelien Jarno [this message]
2009-10-18 14:21 ` [Qemu-devel] [PATCH] target-arm: use clz32() instead of a for loop Laurent Desnogues
2009-10-23 0:34 ` Stuart Brady
2009-10-23 7:04 ` Aurelien Jarno
2009-10-23 12:47 ` Stuart Brady
2009-10-23 14:38 ` Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091015211452.GC7071@volta.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.