Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3x4H-0006Os-LJ for qemu-devel@nongnu.org; Mon, 19 Apr 2010 15:55:41 -0400 Received: from [140.186.70.92] (port=34034 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3x4F-0006IZ-3r for qemu-devel@nongnu.org; Mon, 19 Apr 2010 15:55:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3x4A-0005I8-4i for qemu-devel@nongnu.org; Mon, 19 Apr 2010 15:55:39 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:58540) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3x49-0005Ha-V0 for qemu-devel@nongnu.org; Mon, 19 Apr 2010 15:55:34 -0400 Received: by pwi6 with SMTP id 6so3419357pwi.4 for ; Mon, 19 Apr 2010 12:55:32 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 19 Apr 2010 22:55:29 +0300 Message-ID: From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Subject: [Qemu-devel] Re: singlestep and sparc32 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: qemu-devel On 4/19/10, Artyom Tarasenko wrote: > is -single-step option supposed to work under qemu-system-sparc? Or is > it only for non-pipelined CPUs? I've never used it. > I get pretty strange results: some addresses seem to be executed > twice, and then qemu hangs on the last nop: One possibility is that we don't generate any code at all for nops (sethi x, %g0). If you delete the "if (rd)" check in translate.c:1784, does it help? > -------------- > IN: > 0x00000000: b 0xb788 > -------------- > IN: > 0x00000004: rd %psr, %l0 > -------------- > IN: > 0x00000004: rd %psr, %l0 > -------------- > IN: > 0x00000008: nop > -------------- > IN: > 0x00000008: nop > -------------- > IN: > 0x0000000c: nop > -------------- > IN: > 0x0000000c: nop > > ... skipped ... > > IN: > 0x7000a58c: bg 0x7000a588 > -------------- > IN: > 0x7000a590: nop > -------------- > IN: > 0x7000a590: nop > -------------- > IN: > 0x7000a594: b 0x7000a570 > -------------- > IN: > 0x7000a594: b 0x7000a570 > -------------- > IN: > 0x7000a578: be 0x7000a59c > -------------- > IN: > 0x7000a580: stba %l1, [ %l0 ] #ASI_M_BYPASS > -------------- > IN: > 0x7000a588: deccc %l2 > -------------- > IN: > 0x7000a594: b 0x7000a570 > -------------- > IN: > 0x7000a590: nop > > ^^^^^^^^^^^ That's the end > > Without -singlestep it seems to work better: > > > 0x7000a588: deccc %l2 > 0x7000a58c: bg 0x7000a588 > 0x7000a590: nop > > -------------- > IN: > 0x7000a594: b 0x7000a570 > 0x7000a598: inc %l4 > > -------------- > IN: > 0x7000a570: lduba [ %l4 ] #ASI_M_KERNELTXT, %l1 > 0x7000a574: cmp %l1, 0xff > 0x7000a578: be 0x7000a59c > ... and so on ... > > > > -- > Regards, > Artyom Tarasenko > > solaris/sparc under qemu blog: http://tyom.blogspot.com/ >