From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDy8k-0004MR-UO for qemu-devel@nongnu.org; Fri, 17 Jun 2016 14:05:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDy8g-0006Bu-Qp for qemu-devel@nongnu.org; Fri, 17 Jun 2016 14:05:10 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDy8g-00068X-K3 for qemu-devel@nongnu.org; Fri, 17 Jun 2016 14:05:06 -0400 Received: by mail-wm0-x241.google.com with SMTP id r201so1436886wme.0 for ; Fri, 17 Jun 2016 11:05:02 -0700 (PDT) Sender: Paolo Bonzini References: <20160616185639.5312-1-bobby.prani@gmail.com> <64e568b4-863d-fa79-185e-0da4c719d10d@twiddle.net> From: Paolo Bonzini Message-ID: <7c681e78-7a0b-827d-059d-30e2a3903afe@redhat.com> Date: Fri, 17 Jun 2016 20:04:59 +0200 MIME-Version: 1.0 In-Reply-To: <64e568b4-863d-fa79-185e-0da4c719d10d@twiddle.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] alpha: Fix build error for linux-user List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , Pranith Kumar , qemu-devel On 16/06/2016 21:07, Richard Henderson wrote: >> && ((addr >> 41) & 3) == 2 >> - && addr >> TARGET_VIRT_ADDR_SPACE_BITS == addr >> 63); >> + && addr >> TARGET_VIRT_ADDR_SPACE_BITS == 1); What you want here is + addr >> TARGET_VIRT_ADDR_SPACE_BITS == -1 since that's what addr >> 63 is. With this change the patch should be fine. Alternatively, combining this condition with addr < 0 should be (uint64_t)addr >= (-1ull << TARGET_VIRT_ADDR_SPACE_BITS) I think (I might have an off by one here, sorry). If you go this way, it's of course nicer to change the argument type to uint64_t. Paolo