From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYFbZ-0000Ch-LI for qemu-devel@nongnu.org; Tue, 23 Feb 2016 11:14:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYFbW-0005HU-Gs for qemu-devel@nongnu.org; Tue, 23 Feb 2016 11:14:29 -0500 Received: from mail-qg0-x22e.google.com ([2607:f8b0:400d:c04::22e]:35572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYFbW-0005HQ-BQ for qemu-devel@nongnu.org; Tue, 23 Feb 2016 11:14:26 -0500 Received: by mail-qg0-x22e.google.com with SMTP id y89so139740587qge.2 for ; Tue, 23 Feb 2016 08:14:26 -0800 (PST) Sender: Richard Henderson References: <1455535767-28194-1-git-send-email-rth@twiddle.net> From: Richard Henderson Message-ID: <56CC855E.7080000@twiddle.net> Date: Tue, 23 Feb 2016 08:14:22 -0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PULL 0/5] tcg queued patches List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers On 02/15/2016 05:04 AM, Peter Maydell wrote: > This failed to build on the i686-w64-mingw32 compiler > ("i686-w64-mingw32-gcc (GCC) 4.8.2", from the Ubuntu > gcc-mingw-w64-i686 package version 4.8.2-10ubuntu2+12): > > target-sparc/translate.c: In function ‘gen_intermediate_code’: > target-sparc/translate.c:299:24: error: array subscript is above array > bounds [-Werror=array-bounds] > return cpu_regs[reg]; > ^ > > Fiddling around with the source file to see which call to > gen_dest_gpr() is provoking this shows that it's the one > in gen_ldda_asi() at line 2157 -- if I change the second > argument from 'rd + 1' to 'rd' it compiles OK. Does it also work to change to "rd | 1"? I'd prefer to keep the change as local as possible, especially since I've got another patch set pending that changes all of this code too. > Changing the call site of gen_ldda_asi at line 4727 so its last > argument is 'rd & ~1' rather than 'rd' also suppresses the > error. (That can't possibly change the semantics because we've > just done "if (rd & 1) goto illegal_insn;"...) r~