[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [5123] Fix y register loads and stores
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [5123] Fix y register loads and stores |
Date: |
Tue, 2 Sep 2008 19:55:25 +0300 |
On 9/2/08, Vince Weaver <address@hidden> wrote:
>
>
> > So something is wrong with the sign extension. Unfortunately I won't have
> time to look into this more until tomorrow, but I wanted to just get this
> out there.
> >
>
> I did have time to look at it in the end.
>
> Here's a patch that fixes my test case. I'll have to look at the sparcv9
> manual closer to make sure it's the right thing to do.
>
> Vince
>
> --- ./target-sparc/translate.c.orig 2008-09-01
> 19:03:10.000000000 -0400
> +++ ./target-sparc/translate.c 2008-09-01 19:02:54.000000000 -0400
> @@ -793,8 +793,8 @@
> r_temp = tcg_temp_new(TCG_TYPE_I64);
> r_temp2 = tcg_temp_new(TCG_TYPE_I64);
>
> - tcg_gen_ext_tl_i64(r_temp, src2);
> - tcg_gen_ext_tl_i64(r_temp2, src1);
> + tcg_gen_ext_i32_i64(r_temp, src2);
> + tcg_gen_ext_i32_i64(r_temp2, src1);
>
> tcg_gen_mul_i64(r_temp2, r_temp, r_temp2);
>
> tcg_gen_shri_i64(r_temp, r_temp2, 32);
Thanks, applied to both umul and smul.