From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NMJcm-0001fq-Eg for qemu-devel@nongnu.org; Sun, 20 Dec 2009 06:06:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NMJch-0001eS-Or for qemu-devel@nongnu.org; Sun, 20 Dec 2009 06:06:55 -0500 Received: from [199.232.76.173] (port=60694 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NMJch-0001eL-Hf for qemu-devel@nongnu.org; Sun, 20 Dec 2009 06:06:51 -0500 Received: from mail-gx0-f223.google.com ([209.85.217.223]:59277) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NMJch-00017L-4d for qemu-devel@nongnu.org; Sun, 20 Dec 2009 06:06:51 -0500 Received: by gxk23 with SMTP id 23so4652816gxk.2 for ; Sun, 20 Dec 2009 03:06:50 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4B2D5944.9000704@twiddle.net> References: <4259c837ce1a62fcb495e57f18b588eb7365d286.1261012798.git.rth@twiddle.net> <4B2D11C8.6040507@twiddle.net> <4B2D5944.9000704@twiddle.net> From: Blue Swirl Date: Sun, 20 Dec 2009 11:06:30 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH 5/7] tcg-sparc: Implement setcond, movcond, setcond2, brcond2. Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Sat, Dec 19, 2009 at 10:52 PM, Richard Henderson wrote= : > On 12/19/2009 01:25 PM, Blue Swirl wrote: >> >> On Sat, Dec 19, 2009 at 5:47 PM, Richard Henderson >> =C2=A0wrote: >>> >>> On 12/19/2009 02:31 AM, Blue Swirl wrote: >>>>> >>>>> =C2=A0static inline void tcg_out_movi_imm32(TCGContext *s, int ret, u= int32_t >>>>> arg) >>>>> =C2=A0{ >>>>> - =C2=A0 =C2=A0if (check_fit_tl(arg, 12)) >>>>> + =C2=A0 =C2=A0if (check_fit_tl(arg, 13)) >>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 tcg_out_movi_imm13(s, ret, arg); >>>> >>>> IIRC sign extension prevents this. >>> >>> Pardon? =C2=A0check_fit_tl checks a signed value, the OR opcode provide= s one. >>> =C2=A0Where's the conflict? >> >> Long time ago I tried the same change, but the generated code was not >> correct. But now it seems to work. > > I can't imagine why. =C2=A0I've looked at the instruction encodings very > carefully and double-checked the arithmetic vs GCC. > > I still think the change is correct. =C2=A0I can probably dig up access t= o a > sparc machine and verify, but I don't know that would convince you. No need for that. I tested it and now it seems to work, thanks. There's another case a few lines later, I'll change both.