From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJBte-0000u6-GY for qemu-devel@nongnu.org; Mon, 09 Sep 2013 20:33:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJBtW-0007J1-2y for qemu-devel@nongnu.org; Mon, 09 Sep 2013 20:33:34 -0400 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:50736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJBtV-0007Ix-Rw for qemu-devel@nongnu.org; Mon, 09 Sep 2013 20:33:26 -0400 Received: by mail-pa0-f52.google.com with SMTP id kq13so6882493pab.25 for ; Mon, 09 Sep 2013 17:33:25 -0700 (PDT) Sender: Richard Henderson Message-ID: <522E68D1.6030102@twiddle.net> Date: Mon, 09 Sep 2013 17:33:21 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1378772902-4074-1-git-send-email-rth@twiddle.net> <1378772902-4074-8-git-send-email-rth@twiddle.net> In-Reply-To: <1378772902-4074-8-git-send-email-rth@twiddle.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 7/7] tcg-ppc: Fix and cleanup tcg_out_tlb_check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, aurelien@aurel32.net On 09/09/2013 05:28 PM, Richard Henderson wrote: > + if (add_off >= 0x8000) { > + /* Most target env are smaller than 32k; none are larger than 64k. > + Simplify the logic here merely to offset by 0x8000, giving us a > + range just shy of 64k. Check this assumption. */ > + QEMU_BUILD_BUG_ON(offsetof(CPUArchState, > + tlb_table[NB_MMU_MODES - 1][1]) > + > 0x8000 + 0x7fff); > + tcg_out32(s, ADDI | RT(r1) | RA(base) | 0x8000); > + base = r1; > + cmp_off -= 0x8000; > + add_off -= 0x8000; And of course this is wrong, because 0x8000 == -0x8000. I've fixed this more than once on my branches. How do I keep managing to lose that fix?