From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web09.8393.1651227629189941965 for ; Fri, 29 Apr 2022 03:20:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=V8ilUHje; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651227628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZQngGT4v9M2PGxzECQ0YyDC0rQozd6JblWA8AhsroCw=; b=V8ilUHje14zZZVXEXV82dGxF7mf8ff2VQ2uzyfIJQSu4ilt/BxYYnvX7rZhBlD6/sf58oL voQcv/rCOS51IjCUDl/tDRsa4msR5PK7wHl2zglydEt/KqznHcqUSNRydClfDuOl1jL30s fLDApfZwfIeKr6T4S6J1SquWX6/RHLY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-631-KYkAnQIdMkiN_AcNya0YYg-1; Fri, 29 Apr 2022 06:20:25 -0400 X-MC-Unique: KYkAnQIdMkiN_AcNya0YYg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 99BB7802819; Fri, 29 Apr 2022 10:20:23 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.13]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E827C52C80; Fri, 29 Apr 2022 10:20:23 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0006A180060E; Fri, 29 Apr 2022 12:20:19 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Erdem Aktas , Maciej Rabeda , Abner Chang , Peter Grehan , Gerd Hoffmann , Yuwei Chen , Jiaxin Wu , Siyuan Fu , Sean Brogan , Anthony Perard , Benjamin You , Guomin Jiang , Leif Lindholm , Rebecca Cran , Wei6 Xu , Nickle Wang , Xiaoyu Lu , Zhichao Gao , kilian_kegel@hotmail.com, Liming Gao , Jordan Justen , Sami Mujawar , Andrew Fish , Sami Mujawar , Oliver Steffen , Alexei Fedorov , Guo Dong , Brijesh Singh , Jian J Wang , Supreeth Venkatesh , Min Xu , Bret Barkelew , Maurice Ma , Pawel Polawski , Daniel Schaefer , Bob Feng , James Bottomley , Jiewen Yao , Ray Ni , Julien Grall , Michael D Kinney , Sebastien Boeuf , Zhiguang Liu , Tom Lendacky Subject: [PATCH v3 03/10] MdePkg/CompilerIntrinsicsLib: move size_t typedef to header file Date: Fri, 29 Apr 2022 12:20:12 +0200 Message-Id: <20220429102019.1375348-4-kraxel@redhat.com> In-Reply-To: <20220429102019.1375348-1-kraxel@redhat.com> References: <20220429102019.1375348-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Signed-off-by: Gerd Hoffmann Acked-by: Liming Gao --- .../{memset_ms.c => types_ms.h} | 29 +------------------ .../Library/CompilerIntrinsicsLib/memcpy_ms.c | 6 +--- .../CompilerIntrinsicsLib/memmove_ms.c | 6 +--- .../Library/CompilerIntrinsicsLib/memset_ms.c | 6 +--- 4 files changed, 4 insertions(+), 43 deletions(-) copy MdePkg/Library/CompilerIntrinsicsLib/{memset_ms.c => types_ms.h} (52%) diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c b/MdePkg/Library/CompilerIntrinsicsLib/types_ms.h similarity index 52% copy from MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c copy to MdePkg/Library/CompilerIntrinsicsLib/types_ms.h index deb902c6ae88..d8b578be1f46 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/types_ms.h @@ -1,6 +1,6 @@ // ------------------------------------------------------------------------------ // -// Copyright (c) 2017, Pete Batard. All rights reserved.
+// Copyright (c) 2019, Pete Batard. All rights reserved. // Copyright (c) 2021, Arm Limited. All rights reserved.
// // SPDX-License-Identifier: BSD-2-Clause-Patent @@ -12,30 +12,3 @@ typedef unsigned __int64 size_t; #else typedef unsigned __int32 size_t; #endif - -void * -memset ( - void *, - int, - size_t - ); - -#pragma intrinsic(memset) -#pragma function(memset) -void * -memset ( - void *s, - int c, - size_t n - ) -{ - unsigned char *d; - - d = s; - - while (n-- != 0) { - *d++ = (unsigned char)c; - } - - return s; -} diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c b/MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c index 730aa806d50b..d2c3d7198121 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/memcpy_ms.c @@ -7,11 +7,7 @@ // // ------------------------------------------------------------------------------ -#if defined (_M_ARM64) || defined (_M_X64) -typedef unsigned __int64 size_t; -#else -typedef unsigned __int32 size_t; -#endif +#include "types_ms.h" void * memcpy ( diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c b/MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c index 3207b94a8675..837744a2920c 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/memmove_ms.c @@ -7,11 +7,7 @@ // // ------------------------------------------------------------------------------ -#if defined (_M_ARM64) || defined (_M_X64) -typedef unsigned __int64 size_t; -#else -typedef unsigned __int32 size_t; -#endif +#include "types_ms.h" void * memmove ( diff --git a/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c b/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c index deb902c6ae88..3569bebdf80b 100644 --- a/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c +++ b/MdePkg/Library/CompilerIntrinsicsLib/memset_ms.c @@ -7,11 +7,7 @@ // // ------------------------------------------------------------------------------ -#if defined (_M_ARM64) || defined (_M_X64) -typedef unsigned __int64 size_t; -#else -typedef unsigned __int32 size_t; -#endif +#include "types_ms.h" void * memset ( -- 2.35.1