aboutsummaryrefslogtreecommitdiffstats
path: root/target-cris/helper.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-28 01:44:40 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-28 01:44:40 +0000
commit941db528719cda9ec54e3c5be901e175241141b2 (patch)
tree921a65610a06812d7bb40ccec38c8546884446f7 /target-cris/helper.c
parent57ba97deb8d85c47dd60e8eb0c8a43687770137a (diff)
Use the shiny new clz helpers.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3464 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-cris/helper.c')
-rw-r--r--target-cris/helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-cris/helper.c b/target-cris/helper.c
index 98305605a..d71959326 100644
--- a/target-cris/helper.c
+++ b/target-cris/helper.c
@@ -26,6 +26,7 @@
#include "cpu.h"
#include "mmu.h"
#include "exec-all.h"
+#include "host-utils.h"
#if defined(CONFIG_USER_ONLY)
@@ -134,8 +135,7 @@ void do_interrupt(CPUState *env)
return;
}
- irqnum = 31 -
- __builtin_clz(env->pending_interrupts);
+ irqnum = 31 - clz32(env->pending_interrupts);
irqnum += 0x30;
ebp = env->pregs[SR_EBP];
isr = ldl_code(ebp + irqnum * 4);