From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.4660.1589161690258765995 for ; Sun, 10 May 2020 18:48:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=X6X/kfyp; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: liming.gao@intel.com) IronPort-SDR: BNGSGacSLYGwfInbE1noXndNLqvk8Yw+MNP/Z/LV3AfDfS4GwZ8TgrFlRUdKoRMX5IXhyWS1w4 VPf9OSr1Sp4A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2020 18:48:09 -0700 IronPort-SDR: tdNgw6iqfLu5KSuA7a5Qi8j3FHkJpoIC5oeEQ6FXXgxJMqAIsFSPVh9phkI1kxsKBlikLr6nh9 nv/CghTXKQcg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,378,1583222400"; d="scan'208";a="297527697" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 10 May 2020 18:48:09 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 10 May 2020 18:48:09 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 10 May 2020 18:48:09 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 10 May 2020 18:48:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ccqNob2hZVkXLw0adnX1ptns5ytVnxFe/jF3f/g3Wgzbf9TBOH9M+MVZJPNPRCnmtk8EXdqqxVhrJMTsIx38p7eZL7XF4x2J33/M2//JAexP2rlBE9fa+GQtH/ibIJo2dqg5SkluRkpixQHLzKwcv+SsR5vnhHNNkE8F1lkQAtO5yJ5voRblOvkYjHSBrA8Q0IiMKHBV23+Cod5t2qF6ef+fL4VU8U2Cd3gmwrh7TEsL8FvUysLJZnT00QCznB0N4ztHqbyY4wGO+GFZVX22H7XGn+/ioMVAMhbKnb1XrglzKOIwRzWropMm6HDzZBshWgeiGzME8QcYlV0AzFPayg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iR9Csv0A5GfAS0PWMrjw+dEPybUCUc94YEQTgoB8R8E=; b=KjJUqgoDNeS7fW3e7QMTYAz5kjUgzCFci8B7htEadKU6F3XqpnPC/A4Vu2Q4EDgnk+ZnM/6DVcyW+ZE8PwqsfPt/eiHx9Gzcm31WlfleCYf9BVtnGBlzNpl3bDeXhtD9MY+9PQudhvDE0XJGkE+omL0C9jg22NObDQBPS1GyRDNDCvL/13Io1cIgo8cvGK2j0vuKvPCzq9Lo1oEy5P83r0/EV8j8j8q/Tr+/8tH/HSzUk29Z4IrqI0daz0l1MZfkEaP8w1ux9U0vU1AUs6eLLz3ksIOBxJUJbsbH41Hlgp4GjoMqnSzdDltfOSt75ms2Jj8TvDEZCGPnrLxF0nnRnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iR9Csv0A5GfAS0PWMrjw+dEPybUCUc94YEQTgoB8R8E=; b=X6X/kfyp/Cv5I1pTqPQ5aybVPvcH7WTNyUy4++2ijU/fj3Uubmv5YuHC3Oqqdp8gJio23JlASq2YaMNvh8rxlcRQFItStyH3xzZAcJH3SwPCYBm0toLQA0OYKSCH8dkiP0P1khrjK1gB3vTDqGRODnLVCnCuSSr8jf88PdrMlXg= Received: from BN6PR11MB3972.namprd11.prod.outlook.com (2603:10b6:405:7f::11) by BN6PR11MB1842.namprd11.prod.outlook.com (2603:10b6:404:101::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Mon, 11 May 2020 01:48:05 +0000 Received: from BN6PR11MB3972.namprd11.prod.outlook.com ([fe80::3c03:da06:5345:bfa0]) by BN6PR11MB3972.namprd11.prod.outlook.com ([fe80::3c03:da06:5345:bfa0%7]) with mapi id 15.20.2979.033; Mon, 11 May 2020 01:48:05 +0000 From: "Liming Gao" To: "devel@edk2.groups.io" , "Zhang, Shenglei" CC: "Wang, Jian J" , "Wu, Hao A" Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/RegularExpressionDxe: Optimize the code infrastructure Thread-Topic: [edk2-devel] [PATCH 1/1] MdeModulePkg/RegularExpressionDxe: Optimize the code infrastructure Thread-Index: AQHWJcwDtiV7T6UIPEOfk7abykewAaiiIM3Q Date: Mon, 11 May 2020 01:48:05 +0000 Message-ID: References: <20200509063425.13684-1-shenglei.zhang@intel.com> In-Reply-To: <20200509063425.13684-1-shenglei.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.217] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5ee4e86e-6673-4285-5da2-08d7f54d5985 x-ms-traffictypediagnostic: BN6PR11MB1842: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 04004D94E2 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tYnXSyoiXOXOLF38XeZP+Rx/AlaNrwlZUZB+pjtR6Vf/gzClZ2YGBjMEAE35rLmzKPo9D6EAkC3fq8Ic6KUv1qLMCB/S1QaA2Fob/tuIrQKbp5n97Tvktwt7Dot7NDyAK2GhJ66SmsVBhmKKCN0X05H9LHux1KjGOn8D8nPIBWCrUOb2kMYipGFQHbbUzgZRBSRbtV/fT/jcNsobCAHFxFJpruk/nbLgYfw/9gcJ21kU/1k38Q4Jt45YPx5Xvw2jh2Sv3fnLWV8kK/wp5MJtjkYWbb0J+Hm75qj0pdjkLJnRRO3PjdzeHj2SX1gw7bNXJqfmGH9aMgA3A/EwPoM6oWnrUu+e7wgSaffAosSq8HehdYIfYyTCfCdbUGb1zNBbtNU1XQtrRWvtRM3jLxJw+/al7rF5DRh0Ygh0/KK9D2IoG8E3RaSCwRJx3pmiFooBnBf3OlgzGui9oUS0DwTNf5NriS7E4X22le2YDbKaouU9yuP3V/N3h15gwZs1nqTX/ZyLjFnVaahMTXBUg+Vqx+j20s0zSFG5QdJbYl0gXLcad1WthBSFBLha5JZzpHCf4Izv52lDrvMsMW0EB7kkgBVucoyUCSqDn3U5YXvXiFQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR11MB3972.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(39860400002)(366004)(136003)(346002)(376002)(396003)(33430700001)(33440700001)(52536014)(2906002)(6506007)(966005)(478600001)(86362001)(7696005)(53546011)(66476007)(76116006)(4326008)(26005)(66556008)(5660300002)(66446008)(33656002)(8676002)(6636002)(55016002)(8936002)(54906003)(186003)(110136005)(66946007)(64756008)(316002)(107886003)(71200400001)(9686003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: cYlsqcK/mJwIHi/iFSLoE+Nwx8iD+SD7cWlNPHYv3Ghq37XLyumIrIBr8VVAScp5EDXS9AlH3Y0Fe9AGJUDGFk7ywff+rd8b6zDN0GbygjJeUFysnBqYHQ811aJbainMrL9HXZPlbvljN/6182cFoi7ZgBn26vD9+rUXGuKUhVduT4WdXV7rRVhA0LKlKTrcODmwxk0d2BOiYzxJ9/3/GOPWeKzX/9ypaIvIDeQeStvKcVKyr6j2m2+Q+4RaGuo+GYNaZGSKjO8ya+be28NPPVocLAFqIEj4EJu3vpEnw0J+AE/aT7YTj3dZkTwtgOsJ+oY294iQv4eCLEFBkmSCC/+iv3Svf6I64Scv5XkCHzKcEPizw8V6CP4EN/BDrnAkow70lEVhGQ7O8F/Vy/B3aejyNojTn3ioVsXGr8zYrdkWQgyN9DHTwkRqsKM4N53HNR1kDZ1JZn/wxWuNuBZq/g4mAIOOhJnqSObgEECx7dx3PvM+UBV2w8x55yIowKgs MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5ee4e86e-6673-4285-5da2-08d7f54d5985 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2020 01:48:05.6785 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: QsmWGOyOaFtpd5gruNmh5iPxvNLhxXqRL6xEvdu0VvfWgpB7z0Tal/qLuSBeFq+CVHNc7hElqM+DIFngLi/htw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1842 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao -----Original Message----- From: devel@edk2.groups.io On Behalf Of Zhang, Shen= glei Sent: 2020=1B$BG/=1B(B5=1B$B7n=1B(B9=1B$BF|=1B(B 14:34 To: devel@edk2.groups.io Cc: Wang, Jian J ; Wu, Hao A Subject: [edk2-devel] [PATCH 1/1] MdeModulePkg/RegularExpressionDxe: Optim= ize the code infrastructure OnigurumaIntrinsics.c is now not used. So the implement of function 'memcp= y' is now not., which causes build failure with CLANG9 and XCODE. I remove = OnigurumaIntrinsics.c and move the necessary function implement to Onigurum= aUefiPort.c/h. Cc: Jian J Wang Cc: Hao A Wu Signed-off-by: Shenglei Zhang --- .../OnigurumaIntrinsics.c | 48 ------------------- .../RegularExpressionDxe/OnigurumaUefiPort.c | 5 ++ .../RegularExpress= ionDxe/OnigurumaUefiPort.h | 1 + .../RegularExpressionDxe.inf | 1 - 4 files changed, 6 insertions(+), 49 deletions(-) delete mode 100644 Mde= ModulePkg/Universal/RegularExpressionDxe/OnigurumaIntrinsics.c diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaIntrinsi= cs.c b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaIntrinsics.c deleted file mode 100644 index 536c7e0f1b26..000000000000 --- a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaIntrinsics.c +++ /dev/null @@ -1,48 +0,0 @@ -/** @file - - Provide intrinsics within Oniguruma - - (C) Copyright 2015 Hewlett Packard Enterprise Development LP
- Copyright (c) 2020, Intel Corporation. All rights reserved.
- - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include - -// -// From CryptoPkg/IntrinsicLib -// - -/* Copies bytes between buffers */ -#pragma function(memcpy) -void * memcpy (void *dest, const void *src, unsigned int count) -{ - return CopyMem (dest, src, (UINTN)count); -} - -/* Sets buffers to a specified character */ -#pragma function(memset) -vo= id * memset (void *dest, char ch, unsigned int count) -{ - // - // NOTE: Here we use one base implementation for memset, instead of the= direct - // optimized SetMem() wrapper. Because the IntrinsicLib has to be= built - // without whole program optimization option, and there will be s= ome - // potential register usage errors when calling other optimized c= odes. - // - - // - // Declare the local variables that actually move the data elements as - // volatile to prevent the optimizer from replacing this function with - // the intrinsic memset() - // - volatile UINT8 *Pointer; - - Pointer =3D (UINT8 *)dest; - while (count-- !=3D 0) { - *(Pointer++) =3D ch; - } - - return dest; -} diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort= .c b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c index b1604b378af3..a893ac86959f 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c @@ -86,3 +86,8 @@ void * realloc (void *ptr, size_t size) return NULL; } =20 +void * memcpy (void *dest, const void *src, unsigned int count) { + return CopyMem (dest, src, (UINTN)count); } + diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort= .h b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h index 1a0b2daf473d..dfe4498ce57f 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h +++ b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h @@ -96,6 +96,7 @@ int EFIAPI sprintf_s (char *str, size_t sizeOfBuffer, ch= ar const *fmt, ...); int strlen(const char* str); void* malloc(size_t size); void* realloc(void *ptr, size_t size); +void * memcpy (void *dest, const void *src, unsigned int count); =20 #define exit(n) ASSERT(FALSE); =20 diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpression= Dxe.inf b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.= inf index da63aa6eb418..84489c294279 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf +++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.i +++ nf @@ -20,7 +20,6 @@ [Sources] RegularExpressionDxe.h OnigurumaUefiPort.h OnigurumaUefiPort.c - OnigurumaIntrinsics.c | MSFT =20 # Wrapper header files start # stdio.h -- 2.18.0.windows.1