diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-31 03:45:13 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-31 03:45:13 +0000 |
commit | f51bbbfefe73120a85a8d24a029d37c9c0f3a001 (patch) | |
tree | ded0d23ca903c3c124ceba5ccf342521d6f98c22 /target-arm/helper.c | |
parent | b26eefb68e7942eeb689c81fd20e67e57ad95cd2 (diff) |
ARM TCG conversion 2/16.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4139 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r-- | target-arm/helper.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index df09778ea8..236aaed23b 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -340,6 +340,14 @@ uint32_t HELPER(uxtb16)(uint32_t x) return res; } +uint32_t HELPER(clz)(uint32_t x) +{ + int count; + for (count = 32; x; count--) + x >>= 1; + return count; +} + #if defined(CONFIG_USER_ONLY) void do_interrupt (CPUState *env) |