qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a grou


From: Artyom Tarasenko
Subject: Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation
Date: Fri, 1 Jul 2011 17:53:45 +0200

On Fri, Jul 1, 2011 at 5:20 PM, Laurent Desnogues
<address@hidden> wrote:
> On Fri, Jul 1, 2011 at 5:03 PM, Artyom Tarasenko <address@hidden> wrote:
> [...]
>>> I find it odd that udivx is using cpu_cc_src and cpu_cc_src2.  Using
>>> dedicated local temps seems to fix the issue.
>>
>> Do we need to copy cpu_src* to further temps at all? IMHO
>>
>> -                        tcg_gen_mov_tl(cpu_cc_src, cpu_src1);
>> -                        tcg_gen_mov_tl(cpu_cc_src2, cpu_src2);
>> -                        gen_trap_ifdivzero_tl(cpu_cc_src2);
>> -                        tcg_gen_divu_i64(cpu_dst, cpu_cc_src, cpu_cc_src2);
>> +                        gen_trap_ifdivzero_tl(cpu_src2);
>> +                        tcg_gen_divu_i64(cpu_dst, cpu_src1, cpu_src2);
>>
>> should do it. Or cpu_src is what you mean by dedicated?
>
> You have to use two local temps here to store cpu_src1
> and cpu_src2 because gen_trap_ifdivzero_tl uses
> tcg_gen_brcondi_tl (cf tcg/README comment about
> local usage and jumps).

The same story as the recent crash with wrpr %pstate, I see. I should
have done my homework.
Thanks for the hint!

Artyom

-- 
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]