From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 907EC81EDB for ; Wed, 23 Nov 2016 18:56:40 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 23 Nov 2016 18:56:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,689,1473145200"; d="scan'208";a="1089732598" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.34]) by fmsmga002.fm.intel.com with ESMTP; 23 Nov 2016 18:56:39 -0800 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Jiewen Yao Date: Thu, 24 Nov 2016 10:56:31 +0800 Message-Id: <1479956195-10764-2-git-send-email-hao.a.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.0 In-Reply-To: <1479956195-10764-1-git-send-email-hao.a.wu@intel.com> References: <1479956195-10764-1-git-send-email-hao.a.wu@intel.com> Subject: [PATCH 1/5] MdeModulePkg/EbcDebugger: Operands of same size for bitwise operation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 02:56:40 -0000 Operands in a bitwise operation should have the same size to eliminate unexpected results. Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c index e0b85c7..9e44026 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2016, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -360,8 +360,8 @@ Returns: // // clear STEP flag in any condition. // - if (SystemContext.SystemContextEbc->Flags & VMFLAGS_STEP) { - SystemContext.SystemContextEbc->Flags &= ~VMFLAGS_STEP; + if (SystemContext.SystemContextEbc->Flags & ((UINT64) VMFLAGS_STEP)) { + SystemContext.SystemContextEbc->Flags &= ~((UINT64) VMFLAGS_STEP); } if (!Initialized) { -- 1.9.5.msysgit.0