From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 CD231211A2070 for ; Thu, 3 Jan 2019 18:42:03 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jan 2019 18:42:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,437,1539673200"; d="scan'208";a="132816635" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.9]) by fmsmga004.fm.intel.com with ESMTP; 03 Jan 2019 18:42:01 -0800 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Dandan Bi , Jian J Wang , Ruiyu Ni Date: Fri, 4 Jan 2019 10:41:59 +0800 Message-Id: <20190104024159.6792-1-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 Subject: [PATCH] MdeModulePkg/SdMmcPciHcDxe: Fix VS2015 IA32 NOOPT build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2019 02:42:04 -0000 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1425 This commit will resolve the VS2015 IA32 NOOPT build failure within SdMmcPciHcDxe. More specifically, this commit will use BaseLib API RShiftU64() to perform right-shift operations for UINT64 type operators. Cc: Dandan Bi Cc: Jian J Wang Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c index 6086720fa1..5aec8c6992 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c @@ -1505,7 +1505,7 @@ BuildAdmaDescTable ( Trb->Adma32Desc[Index].Valid = 1; Trb->Adma32Desc[Index].Act = 2; if (DataLength26) { - Trb->Adma32Desc[Index].UpperLength = (UINT16)(Remaining >> 16); + Trb->Adma32Desc[Index].UpperLength = (UINT16)RShiftU64 (Remaining, 16); } Trb->Adma32Desc[Index].LowerLength = (UINT16)(Remaining & MAX_UINT16); Trb->Adma32Desc[Index].Address = (UINT32)Address; @@ -1524,11 +1524,11 @@ BuildAdmaDescTable ( Trb->Adma64Desc[Index].Valid = 1; Trb->Adma64Desc[Index].Act = 2; if (DataLength26) { - Trb->Adma64Desc[Index].UpperLength = (UINT16)(Remaining >> 16); + Trb->Adma64Desc[Index].UpperLength = (UINT16)RShiftU64 (Remaining, 16); } Trb->Adma64Desc[Index].LowerLength = (UINT16)(Remaining & MAX_UINT16); Trb->Adma64Desc[Index].LowerAddress = (UINT32)Address; - Trb->Adma64Desc[Index].UpperAddress = (UINT32)(Address >> 32); + Trb->Adma64Desc[Index].UpperAddress = (UINT32)RShiftU64 (Address, 32); break; } else { Trb->Adma64Desc[Index].Valid = 1; @@ -1538,7 +1538,7 @@ BuildAdmaDescTable ( } Trb->Adma64Desc[Index].LowerLength = 0; Trb->Adma64Desc[Index].LowerAddress = (UINT32)Address; - Trb->Adma64Desc[Index].UpperAddress = (UINT32)(Address >> 32); + Trb->Adma64Desc[Index].UpperAddress = (UINT32)RShiftU64 (Address, 32); } } -- 2.12.0.windows.1