On 01/10/2012 09:27 PM, Edgar E. Iglesias wrote:
> +++ b/target-microblaze/helper.h
> @@ -5,6 +5,7 @@ DEF_HELPER_0(debug, void)
> DEF_HELPER_FLAGS_3(carry, TCG_CALL_PURE | TCG_CALL_CONST, i32, i32, i32, i32)
> DEF_HELPER_2(cmp, i32, i32, i32)
> DEF_HELPER_2(cmpu, i32, i32, i32)
> +DEF_HELPER_1(c
On Wed, Jan 11, 2012 at 10:19:19AM +1100, Richard Henderson wrote:
> On 01/10/2012 09:27 PM, Edgar E. Iglesias wrote:
> > +++ b/target-microblaze/helper.h
> > @@ -5,6 +5,7 @@ DEF_HELPER_0(debug, void)
> > DEF_HELPER_FLAGS_3(carry, TCG_CALL_PURE | TCG_CALL_CONST, i32, i32, i32,
> > i32)
> > DEF_H
On Tue, Jan 10, 2012 at 03:37:51PM +, Peter Maydell wrote:
> On 10 January 2012 10:27, Edgar E. Iglesias wrote:
> > +uint32_t helper_clz(uint32_t t0)
> > +{
> > + if (t0 == 0) {
> > + return 32;
> > + }
> > + if (t0 == ~0) {
> > + return 0;
> > + }
> > + return clz
On 10 January 2012 10:27, Edgar E. Iglesias wrote:
> +uint32_t helper_clz(uint32_t t0)
> +{
> + if (t0 == 0) {
> + return 32;
> + }
> + if (t0 == ~0) {
> + return 0;
> + }
> + return clz32(t0);
> +}
I think clz32() handles both the 0 and 0x cases correctly,
so
Signed-off-by: Edgar E. Iglesias
---
target-microblaze/helper.h|1 +
target-microblaze/op_helper.c | 11 +++
target-microblaze/translate.c | 11 +++
3 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/target-microblaze/helper.h b/target-microblaze/helper.h