[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 0/5] tcg queued patches

From: Richard Henderson
Subject: Re: [Qemu-devel] [PULL 0/5] tcg queued patches
Date: Tue, 23 Feb 2016 08:14:22 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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;"...)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]