On Fri, Jul 1, 2011 at 2:57 PM, Jakub Jermar <ja...@jermar.eu> 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.
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. HTH, Laurent