public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Hao Wu <hao.a.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Hao Wu <hao.a.wu@intel.com>, Jiewen Yao <jiewen.yao@intel.com>
Subject: [PATCH 1/5] MdeModulePkg/EbcDebugger: Operands of same size for bitwise operation
Date: Thu, 24 Nov 2016 10:56:31 +0800	[thread overview]
Message-ID: <1479956195-10764-2-git-send-email-hao.a.wu@intel.com> (raw)
In-Reply-To: <1479956195-10764-1-git-send-email-hao.a.wu@intel.com>

Operands in a bitwise operation should have the same size to eliminate
unexpected results.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 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



  reply	other threads:[~2016-11-24  2:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24  2:56 [PATCH 0/5] Code refinements in MdeModulePkg/EbcDebugger Hao Wu
2016-11-24  2:56 ` Hao Wu [this message]
2016-11-24  2:56 ` [PATCH 2/5] MdeModulePkg/EbcDebugger: Add check for invalid 'CommandArg' Hao Wu
2016-11-24  2:56 ` [PATCH 3/5] MdeModulePkg/EbcDebugger: Add missing check for symbol not found Hao Wu
2016-11-24  2:56 ` [PATCH 4/5] MdeModulePkg/EbcDebugger: Add ASSERT to ensure FieldBuffer is not NULL Hao Wu
2016-11-24  2:56 ` [PATCH 5/5] MdeModulePkg/EbcDebugger: Compare ASCII char with '\0' Hao Wu
2016-11-24  3:12 ` [PATCH 0/5] Code refinements in MdeModulePkg/EbcDebugger Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479956195-10764-2-git-send-email-hao.a.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox