From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEQLF-0008Hu-88 for qemu-devel@nongnu.org; Wed, 19 Sep 2012 15:53:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEQLE-0006Vr-0a for qemu-devel@nongnu.org; Wed, 19 Sep 2012 15:53:49 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:50612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEQLD-0006VT-QN for qemu-devel@nongnu.org; Wed, 19 Sep 2012 15:53:47 -0400 Received: by pbbrp12 with SMTP id rp12so3232465pbb.4 for ; Wed, 19 Sep 2012 12:53:46 -0700 (PDT) Sender: Richard Henderson Message-ID: <505A22C8.6030409@twiddle.net> Date: Wed, 19 Sep 2012 12:53:44 -0700 From: Richard Henderson MIME-Version: 1.0 References: <5059FA36.1080301@twiddle.net> <505A011C.1020106@twiddle.net> <20120919175116.GC29951@hall.aurel32.net> <505A0895.8000008@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Shifts, ppc[64], xtensa List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Filippov Cc: Peter Maydell , qemu-devel@nongnu.org, Aurelien Jarno On 09/19/2012 11:30 AM, Peter Maydell wrote: > ...but on the other hand that ought to work for PPC too, so > presumably my analysis is wrong somewhere. It isn't. It's a target-xtensa bug. > OP: > ---- 0xd0079cff > movi_i32 tmp0,$0xd0079cff > movi_i32 tmp1,$0x2 > movi_i32 tmp2,$0x1 > movi_i32 tmp3,$advance_ccount > call tmp3,$0x0,$0,env,tmp2 > movi_i32 tmp2,$window_check > call tmp2,$0x0,$0,env,tmp0,tmp1 > and_i32 tmp0,ar9,ar8 > movi_i32 tmp1,$0x0 > brcond_i32 tmp0,tmp1,eq,$0x0 > movi_i32 tmp2,$0x0 > brcond_i32 LCOUNT,tmp2,eq,$0x1 > movi_i32 tmp2,$0x1 > sub_i32 LCOUNT,LCOUNT,tmp2 > movi_i32 tmp2,$0xd0079cf2 > mov_i32 pc,tmp2 > goto_tb $0x0 > exit_tb $0x4a116558 > set_label $0x1 > movi_i32 tmp2,$0xd0079d02 > mov_i32 pc,tmp2 > exit_tb $0x0 > set_label $0x0 > movi_i32 tmp2,$0xd0079d1a > mov_i32 pc,tmp2 > goto_tb $0x1 > exit_tb $0x4a116559 > movi_i32 tmp0,$0x0 > brcond_i32 LCOUNT,tmp0,eq,$0x2 > movi_i32 tmp0,$0x1 > sub_i32 LCOUNT,LCOUNT,tmp0 > movi_i32 tmp0,$0xd0079cf2 > mov_i32 pc,tmp0 > goto_tb $0x0 > exit_tb $0x4a116558 > set_label $0x2 > movi_i32 tmp0,$0xd0079d02 > mov_i32 pc,tmp0 > exit_tb $0x0 There are two instances of goto_tb $0 in here. And, amusingly, two checks for LCOUNT. Since there's no disassembler for xtensa, I'll leave it to the maintainer to track down from whence this mistake stems. r~