From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067039.outbound.protection.outlook.com [40.92.67.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BBE3821DF9668 for ; Wed, 2 Aug 2017 07:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AmXPd4cKP4+7ma64oj9pwB8gWLuBtyJho4x2LAFk7Pc=; b=BUqluMiDmSSchEKZkNho0DP7xFgctV2PuJ41iqFz3QC1vJHbf/mn1i3skcpSMEteVfRkfslbHmRXvgqdv1wskTDXJx53uqSDIVrPsCxKqdXBWTEaz2hQsWBo3bA2YjMuPaDYkIGTWykh9vzE62CRjARQTpqKfBxJi6udcGtUz6ZOwwGtnkLlABzE/tFBx2yiIUV3sVFiPh0clt5d1cC7LsIdkwid6ijJlKP2lBzVEy5O0WXk9TItMJkYCuRfWz9IYkQMctGZsYyBrEBygSEa2E5yYwFTsN8SDgywC1YWCHQmqm+kpqq7MlwCFzIbxoMH58egkLQ+lAh76Qmi9LDNKw== Received: from HE1EUR02FT051.eop-EUR02.prod.protection.outlook.com (10.152.10.59) by HE1EUR02HT190.eop-EUR02.prod.protection.outlook.com (10.152.11.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1282.16; Wed, 2 Aug 2017 14:04:42 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com (10.152.10.54) by HE1EUR02FT051.mail.protection.outlook.com (10.152.11.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.16 via Frontend Transport; Wed, 2 Aug 2017 14:04:42 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::dcd0:60e6:90e0:871b]) by AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::dcd0:60e6:90e0:871b%13]) with mapi id 15.01.1304.023; Wed, 2 Aug 2017 14:04:41 +0000 From: Marvin H?user To: "edk2-devel@lists.01.org" CC: Yonghong Zhu , "afish@apple.com" , "liming.gao@intel.com" , "michael.d.kinney@intel.com" Thread-Topic: [edk2] [Patch 4/4] MdePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined Thread-Index: AQHTC3G6j3eaq2737ESFytGf3Bn2fKJxGF6g Date: Wed, 2 Aug 2017 14:04:41 +0000 Message-ID: References: <1501666085-21208-1-git-send-email-yonghong.zhu@intel.com> <1501666085-21208-5-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1501666085-21208-5-git-send-email-yonghong.zhu@intel.com> Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=outlook.com; x-incomingtopheadermarker: OriginalChecksum:AE6D0190878E5467AC8B89A57CDB6EAE9338DC487A1B35246977420EAB39573F; UpperCasedChecksum:EC7DF1A846E41B485334C76E6E369FB24810773313946A1E4E6978BD50F79ACF; SizeAsReceived:7589; Count:45 x-tmn: [Ie/IWrzI9/wdp0oiWwYwycpLedEXtI8ISn7OWVeFwdXk2oDNix0st4CCVcSiTYrl] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1EUR02HT190; 7:/pC8gnXerKmzlc092OwQcfd70witqeYEsNFKnEC4CQY7XjZw+DXWKLbVPqXAC7rOH+vv8Po0gQRJfKGxzFHJtuJukzD4ak2usZT6iwInMpb+xsLtd6NPaMVr6ZKf7ijXQyz3/qSUZnAbvpXZttET9r+bJWkKbVtGf0TLg26bHmw++bV+fxYLx9WfzMEr4H3zUD4giQB6S5sMhvXQxEDGZGF7h0BzKTRRyOfHONgZ8XTyn9RVXnZa94uJdrvKaRopvNzEUcn99v+YM3NYGOdhzLCAH4tHduA1Wd0CAmtISwyR5uXicXNhAMLbTf/EKXRe2GNX36l/CK9u5lv+lJ07l1a6Sx3OcbdvmyTcX+Kd7xh1Z7RARCwVE0AtYXi5UVLqh7PYphqkY75pBHVuh/eI7io8OOLk4Tu52eyETXF0FlYVtVZfhzEn2YHALozdc1nv+sCxeoxgDxJe3HZnWmnSe92MazPyRaFEATCkWuAhdBc+oZtEXawxZKbKdsJO59nuHAAv3OxftETpzrNqzAoRujahCpK0gb0jtZu5Wy2VPvVv0mNzDU1dNXe0Wq5oY1uMPilQedRaN8HT2TK3TMsS374cdgeEkFkhw03m9Lk9Rp1zjsBMIVAB0XflEmGFbIioI0F5zOJE99mHR5aRYAOlStbA2iLfWPC07CswoxhOrPy+mOWr3irV0+yBYtFNQOvOF4os2Qiai13+MFvwR8vlLZcq2+b6a7RyLJ4MGzgkTJHK1gSOuHgfoJQrqz/sWmng1Ce345yt2WKJWnXP8MaoeA== x-incomingheadercount: 45 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1EUR02HT190; H:AM4PR06MB1491.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: 87db0167-daa4-44a9-2fac-08d4d9af6bf2 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322377)(1601125374)(1603101448)(1701031045)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1EUR02HT190; x-ms-traffictypediagnostic: HE1EUR02HT190: x-exchange-antispam-report-test: UriScan:(80524489315369)(788757137089)(162533806227266)(31960201722614)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031); SRVR:HE1EUR02HT190; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1EUR02HT190; x-forefront-prvs: 0387D64A71 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2017 14:04:41.8683 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT190 Subject: Re: [Patch 4/4] MdePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 14:02:35 -0000 Content-Language: de-DE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello Yonghong and Andrew, This patch may cause issues when compiling MSVC x IA32 as the optimizer mig= ht replace the shift with an intrinsic. I suggest you to use LShiftU64() rather than the << operator. Regards, Marvin. > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Yonghong Zhu > Sent: Wednesday, August 2, 2017 11:28 AM > To: edk2-devel@lists.01.org > Cc: Michael D Kinney ; Andrew Fish > ; Liming Gao > Subject: [edk2] [Patch 4/4] MdePkg: Fix Xcode 9 Beta treating 32-bit left= shift > as undefined >=20 > Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=3D635 >=20 > Cc: Liming Gao > Cc: Michael D Kinney > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Andrew Fish > --- > MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git > a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c > b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c > index e3b2846..ce1fe0a 100644 > --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c > +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c > @@ -38,18 +38,18 @@ FillBuf ( > ) > { > // > // Left shift NumOfBits of bits in advance > // > - Sd->mBitBuf =3D (UINT32) (Sd->mBitBuf << NumOfBits); > + Sd->mBitBuf =3D (UINT32) (((UINT64)Sd->mBitBuf) << NumOfBits); >=20 > // > // Copy data needed in bytes into mSbuBitBuf > // > while (NumOfBits > Sd->mBitCount) { >=20 > - Sd->mBitBuf |=3D (UINT32) (Sd->mSubBitBuf << (NumOfBits =3D (UINT16) > (NumOfBits - Sd->mBitCount))); > + Sd->mBitBuf |=3D (UINT32) (((UINT64)Sd->mSubBitBuf) << (NumOfBits = =3D > (UINT16) (NumOfBits - Sd->mBitCount))); >=20 > if (Sd->mCompSize > 0) { > // > // Get 1 byte into SubBitBuf > // > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel