From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 9D347211A43B4 for ; Thu, 3 Jan 2019 19:36:58 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jan 2019 19:36:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,437,1539673200"; d="scan'208";a="264299847" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 03 Jan 2019 19:36:57 -0800 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 3 Jan 2019 19:36:57 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 3 Jan 2019 19:36:57 -0800 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.44]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.196]) with mapi id 14.03.0415.000; Fri, 4 Jan 2019 11:36:55 +0800 From: "Bi, Dandan" To: "Wu, Hao A" , "edk2-devel@lists.01.org" CC: "Wang, Jian J" , "Ni, Ray" Thread-Topic: [PATCH] MdeModulePkg/SdMmcPciHcDxe: Fix VS2015 IA32 NOOPT build failure Thread-Index: AQHUo9cVT5xir23qOE+9noVj+I9YaKWedTvA Date: Fri, 4 Jan 2019 03:36:54 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40B7B221@SHSMSX152.ccr.corp.intel.com> References: <20190104024159.6792-1-hao.a.wu@intel.com> In-Reply-To: <20190104024159.6792-1-hao.a.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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 03:36:58 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bi Dandan Thanks, Dandan > -----Original Message----- > From: Wu, Hao A > Sent: Friday, January 4, 2019 10:42 AM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A ; Bi, Dandan ; > Wang, Jian J ; Ni, Ray > Subject: [PATCH] MdeModulePkg/SdMmcPciHcDxe: Fix VS2015 IA32 NOOPT > build failure >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1425 >=20 > This commit will resolve the VS2015 IA32 NOOPT build failure within > SdMmcPciHcDxe. >=20 > More specifically, this commit will use BaseLib API RShiftU64() to perfor= m > right-shift operations for UINT64 type operators. >=20 > 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(-) >=20 > 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 =3D 1; > Trb->Adma32Desc[Index].Act =3D 2; > if (DataLength26) { > - Trb->Adma32Desc[Index].UpperLength =3D (UINT16)(Remaining >> 1= 6); > + Trb->Adma32Desc[Index].UpperLength =3D (UINT16)RShiftU64 > + (Remaining, 16); > } > Trb->Adma32Desc[Index].LowerLength =3D (UINT16)(Remaining & > MAX_UINT16); > Trb->Adma32Desc[Index].Address =3D (UINT32)Address; @@ -1524,11 > +1524,11 @@ BuildAdmaDescTable ( > Trb->Adma64Desc[Index].Valid =3D 1; > Trb->Adma64Desc[Index].Act =3D 2; > if (DataLength26) { > - Trb->Adma64Desc[Index].UpperLength =3D (UINT16)(Remaining >> = 16); > + Trb->Adma64Desc[Index].UpperLength =3D (UINT16)RShiftU64 > + (Remaining, 16); > } > Trb->Adma64Desc[Index].LowerLength =3D (UINT16)(Remaining & > MAX_UINT16); > Trb->Adma64Desc[Index].LowerAddress =3D (UINT32)Address; > - Trb->Adma64Desc[Index].UpperAddress =3D (UINT32)(Address >> 32); > + Trb->Adma64Desc[Index].UpperAddress =3D (UINT32)RShiftU64 > + (Address, 32); > break; > } else { > Trb->Adma64Desc[Index].Valid =3D 1; @@ -1538,7 +1538,7 @@ > BuildAdmaDescTable ( > } > Trb->Adma64Desc[Index].LowerLength =3D 0; > Trb->Adma64Desc[Index].LowerAddress =3D (UINT32)Address; > - Trb->Adma64Desc[Index].UpperAddress =3D (UINT32)(Address >> 32); > + Trb->Adma64Desc[Index].UpperAddress =3D (UINT32)RShiftU64 > + (Address, 32); > } > } >=20 > -- > 2.12.0.windows.1