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.151; helo=mga17.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 81C9721962301 for ; Thu, 3 Jan 2019 20:14:38 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jan 2019 20:14:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,437,1539673200"; d="scan'208";a="115351659" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 03 Jan 2019 20:14:37 -0800 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 3 Jan 2019 20:14:37 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 3 Jan 2019 20:14:36 -0800 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.239]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.150]) with mapi id 14.03.0415.000; Fri, 4 Jan 2019 12:14:35 +0800 From: "Wang, Jian J" To: "Wu, Hao A" , "edk2-devel@lists.01.org" CC: "Bi, Dandan" , "Ni, Ray" Thread-Topic: [PATCH] MdeModulePkg/SdMmcPciHcDxe: Fix VS2015 IA32 NOOPT build failure Thread-Index: AQHUo9cVzLuv6cwndkGD/wO7WJ2PHqWegERA Date: Fri, 4 Jan 2019 04:14:33 +0000 Message-ID: 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-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWEwY2MyNWUtZjQ5Yi00YjMxLWJhYWUtNWJjM2I4ZDBhY2RhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib3EzZU9maTNpR0hvVUxQQlp6WW5qa1o0Wk1wTHI0SXlaOWxxTkFiVWwyTjMrcXplSG9HOFc3dXdhbDFTXC83QlwvIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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 04:14:38 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jian J Wang > -----Original Message----- > From: Wu, Hao A > Sent: Friday, January 04, 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 (Rema= ining, > 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 (Rem= aining, > 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 (Addre= ss, 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 (Addre= ss, 32); > } > } >=20 > -- > 2.12.0.windows.1