aboutsummaryrefslogtreecommitdiff
path: root/target-mips/op_helper.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-27 13:05:54 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-27 13:05:54 +0000
commit05f778c8bdfa3f0499c3777f562db1feed338502 (patch)
tree024fe239018f00eb7d354e2604f13cdd01131e46 /target-mips/op_helper.c
parent5592a750b913c859c738eb2774c26632dcac8350 (diff)
Add sharable clz/clo inline functions and use them for the mips target.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3455 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op_helper.c')
-rw-r--r--target-mips/op_helper.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index f3e01202e6..ff26ab5afa 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -20,6 +20,8 @@
#include <stdlib.h>
#include "exec.h"
+#include "host-utils.h"
+
#define GETPC() (__builtin_return_address(0))
/*****************************************************************************/
@@ -141,6 +143,17 @@ void do_drotrv (void)
} else
T0 = T1;
}
+
+void do_dclo (void)
+{
+ T0 = clo64(T0);
+}
+
+void do_dclz (void)
+{
+ T0 = clz64(T0);
+}
+
#endif /* TARGET_LONG_BITS > HOST_LONG_BITS */
#endif /* TARGET_MIPSN32 || TARGET_MIPS64 */