Received: from eggs.gnu.org ([2001:4830:134:3::10]:45701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmQF5-0006QP-Mh for qemu-devel@nongnu.org; Tue, 20 Sep 2016 14:58:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmQF2-0001QS-Bp for qemu-devel@nongnu.org; Tue, 20 Sep 2016 14:58:06 -0400 Received: from mail-yb0-x241.google.com ([2607:f8b0:4002:c09::241]:35645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmQF2-0001QL-7v for qemu-devel@nongnu.org; Tue, 20 Sep 2016 14:58:04 -0400 Received: by mail-yb0-x241.google.com with SMTP id p81so553335ybb.2 for ; Tue, 20 Sep 2016 11:58:04 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Tue, 20 Sep 2016 11:57:28 -0700 Message-Id: <1474397848-19262-2-git-send-email-rth@twiddle.net> In-Reply-To: <1474397848-19262-1-git-send-email-rth@twiddle.net> References: <1474397848-19262-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH] tcg/i386: Extend TARGET_PAGE_MASK to the proper type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org TARGET_PAGE_MASK, as defined, has type "int". We need to extend that to the proper target width before oring in an "unsigned". Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index cf7536b..eeb1777 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc.c @@ -1243,7 +1243,7 @@ static inline void tcg_out_tlb_load(TCGContext *s, TCGReg addrlo, TCGReg addrhi, } else { tcg_out_modrm_offset(s, OPC_LEA + trexw, r1, addrlo, s_mask - a_mask); } - tlb_mask = TARGET_PAGE_MASK | a_mask; + tlb_mask = (target_ulong)TARGET_PAGE_MASK | a_mask; tcg_out_shifti(s, SHIFT_SHR + tlbrexw, r0, TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS); -- 2.7.4