[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: |
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:03:10 +0200 |
On Fri, Jul 1, 2011 at 4:15 PM, Laurent Desnogues
<address@hidden> wrote:
> On Fri, Jul 1, 2011 at 2:57 PM, Jakub Jermar <address@hidden> wrote:
> [...]
>> When _not_ singlestepping via GDB's `stepi`, the testcase will fail and
>> crash Qemu like this:
>>
>> qemu: fatal: Trap 0x0101 while trap level (5) >= MAXTL (5), Error state
>> <register dumped here>
>>
>> On the other hand, when I attach GDB to Qemu and step through all
>> instructions using `stepi`, the testcase will succeed and crash Qemu
>> like this:
>>
>> qemu: fatal: Trap 0x0100 while trap level (5) >= MAXTL (5), Error state
>> <registers dumped here>
>>
>> Mind the difference in the trap type - 0x100 for success, 0x101 for failure.
>>
>> This is how I run the test:
>>
>> Without GDB:
>> $ qemu-system-sparc64 -bios ./testcase
>>
>> With GDB:
>> $ qemu-system-sparc64 -bios ./testcase -s -S
>>
>> From another terminal:
>> $ /usr/local/cross/sparc64/bin/sparc64-linux-gnu-gdb
>> (gdb) set architecture sparc:v9
>> (gdb) target remote localhost:1234
>> (gdb) stepi
>> ...
>>
>> Hope this helps to fix the problem.
It definitely does, thanks a lot Jakub!
> You don't have to use gdb to reproduce the issue, just add -singlestep
> when running qemu.
>
> 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?
--
Regards,
Artyom Tarasenko
solaris/sparc under qemu blog: http://tyom.blogspot.com/
- 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, 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 <=
- 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, 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