[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a grou
From: |
Laurent Desnogues |
Subject: |
Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation |
Date: |
Fri, 1 Jul 2011 17:20:16 +0200 |
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). Note you'll have to do something
similar in gen_op_sdivx.
Laurent
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, (continued)
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Jakub Jermar, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Artyom Tarasenko, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Jakub Jermar, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Jakub Jermar, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Laurent Desnogues, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Jakub Jermar, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Artyom Tarasenko, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Laurent Desnogues, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Jakub Jermar, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Artyom Tarasenko, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation,
Laurent Desnogues <=
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Artyom Tarasenko, 2011/07/01
- Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation, Artyom Tarasenko, 2011/07/01