From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vk1-f175.google.com (mail-vk1-f175.google.com [209.85.221.175]) by mx.groups.io with SMTP id smtpd.web10.5026.1647568491145901316 for ; Thu, 17 Mar 2022 18:54:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AQy5Ij8a; spf=pass (domain: gmail.com, ip: 209.85.221.175, mailfrom: pedro.falcato@gmail.com) Received: by mail-vk1-f175.google.com with SMTP id 6so667307vkc.10 for ; Thu, 17 Mar 2022 18:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=krBgq1yV0e/7vSGJXrztCpYZlBjtcUrPYk36/1rkWyE=; b=AQy5Ij8abAGDzKh+Tnj2AVKhtpSM8y7JRFDREfU1Jkxj4RqAx8fwhNfwAwovC0yJzW VNKvXBBmBpNDz2UjBr3XrCmaWoPkrUdMdIXGpzcqAjN9h2Li4h3fHeut8r0jTAXs9l9I +EjBQxAnNy4uoNDnTJrHsv5BOOQlGAkmko9yEbsCtmc1AJgqUQcbco28oNoQDvg6NbOH wsUVVeTeRi5vL+eXTs+dfxRXGmPwIgvl1XL7JhNhlR8pFcTfe9G7DtUWC0RwzH1Nl6Rc Dm7r1SEUlBwXdpbmu0ycdMTjYLelWCU1rcOkP/7+drHIqBIScwmcD3oWAg1Ckyp2rGvG hJxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=krBgq1yV0e/7vSGJXrztCpYZlBjtcUrPYk36/1rkWyE=; b=aPah0l0LKxkFdgTrp5/8t2lKtbJb0RmY3igL3ahYQAbRIh1ki6ND2F8UTkEf2jajrN jnsYBpHK1HI4xfxgiWQ226twhW0unLMlYgwbOsXdUfsX9FugUHriSM/FuvCeg6R0w+jY IZZtqMctkCxwQ5OAyBQLRQUd881M0EjXX37PHLNYcYAnN783W3aB2rfswCuB45tb+t4d ldm+6cdmvJICzFsNN/lOgd4QSrbrpd76m0QLR5lSdJnbBozo/K2CZbQ6wd7adGph4Z28 gGwtK92aueP9Wjl8afK7wb5mkXhwdD6Y3yIqLRzq71i4DBwslS6j/wU/U2l3W9SQuUee 2nbA== X-Gm-Message-State: AOAM531hdPEPAmrJ5QBN22E6VZ+6g+k+POcc1ZbLc4cTilCLBQ4IH4w1 yWp8GXuLsq/ImT2XmHOc9ZaF/rrdkf2tlnsAULxrTBBbR4Y8RWx5 X-Google-Smtp-Source: ABdhPJz6a0zhR/mdVdcucfEYTVwZ1mUVW7ItCqbfI4kr15EAij32RbCWeasTQIuZyPEj2Vf0rnRO994oTn9UhkPc8Po= X-Received: by 2002:ac5:c291:0:b0:33e:a86a:cef with SMTP id h17-20020ac5c291000000b0033ea86a0cefmr1182915vkk.26.1647568489981; Thu, 17 Mar 2022 18:54:49 -0700 (PDT) MIME-Version: 1.0 References: <20220301071820.3135133-1-kraxel@redhat.com> <20220315122242.xwi2xckfos2c3cff@sirius.home.kraxel.org> <20220316094538.t4ox4p5amfgwt5t6@sirius.home.kraxel.org> <018801d83a67$3c3ef0f0$b4bcd2d0$@byosoft.com.cn> In-Reply-To: <018801d83a67$3c3ef0f0$b4bcd2d0$@byosoft.com.cn> From: "Pedro Falcato" Date: Fri, 18 Mar 2022 01:54:38 +0000 Message-ID: Subject: Re: [edk2-devel] [PATCH 0/3] [RFC] consolidate compiler intrinsics To: edk2-devel-groups-io , Liming Gao Cc: Gerd Hoffmann , "Kinney, Michael D" , Sean Brogan , "Lu, Xiaoyu1" , "Feng, Bob C" , Rebecca Cran , James Bottomley , Sami Mujawar , "Justen, Jordan L" , "Aktas, Erdem" , "Yao, Jiewen" , Supreeth Venkatesh , "Boeuf, Sebastien" , "Gao, Zhichao" , "Liu, Zhiguang" , Maciej Rabeda , "Ma, Maurice" , Andrew Fish , Ard Biesheuvel , Tom Lendacky , Peter Grehan , "Jiang, Guomin" , Bret Barkelew , "Chen, Christine" , "You, Benjamin" , "Schaefer, Daniel" , "Xu, Wei6" , "Wang, Jian J" , "Wu, Jiaxin" , "Fu, Siyuan" , "Dong, Guo" , kilian_kegel@hotmail.com, "Chang, Abner" , Oliver Steffen , Leif Lindholm , Brijesh Singh , "Xu, Min M" , "Ni, Ray" , Alexei Fedorov , Julien Grall , "Wang, Nickle" , Pawel Polawski , Anthony Perard Content-Type: multipart/alternative; boundary="00000000000096aa3505da746e58" --00000000000096aa3505da746e58 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Something I've just noticed: edk2-libc also ships its own intrinsics ( https://github.com/tianocore/edk2-libc/blob/master/StdLib/LibC/CRT/Gcc.c) I know edk2-libc is not part of the core edk2 repo but I think we should keep this in mind when this patch set gets merged. On Fri, Mar 18, 2022 at 1:27 AM gaoliming wrote: > Gerd: > I suggest to submit the different BZs for those tasks. This patch set i= s > the first stage. Future enhancement can be added later. > > If no more comment for the first stage, this patch set can be merged > first. > > Thanks > Liming > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: Gerd Hoffmann > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B43=E6=9C=8816=E6=97= =A5 17:46 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; michael.d.kinney@int= el.com > > =E6=8A=84=E9=80=81: Sean Brogan ; Lu, Xiaoyu= 1 > > ; Feng, Bob C ; Rebecca Cra= n > > ; James Bottomley ; Sami > > Mujawar ; Justen, Jordan L > > ; Aktas, Erdem ; Yao, > > Jiewen ; Supreeth Venkatesh > > ; Boeuf, Sebastien > > ; Gao, Zhichao ; Liu, > > Zhiguang ; Maciej Rabeda > > ; Ma, Maurice ; > > Andrew Fish ; Ard Biesheuvel > > ; Tom Lendacky ; > > Peter Grehan ; Jiang, Guomin > > ; Bret Barkelew ; > > Chen, Christine ; You, Benjamin > > ; Schaefer, Daniel ; > > Gao, Liming ; Xu, Wei6 ; > > Wang, Jian J ; Wu, Jiaxin ; > Fu, > > Siyuan ; Dong, Guo ; > > kilian_kegel@hotmail.com; Chang, Abner ; Oliver > > Steffen ; Leif Lindholm >; > > Brijesh Singh ; Xu, Min M ; > > Ni, Ray ; Alexei Fedorov ; > > Julien Grall ; Wang, Nickle ; Pawe= l > > Polawski ; Anthony Perard > > > > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH 0/3] [RFC] consolidate comp= iler intrinsics > > > > On Tue, Mar 15, 2022 at 03:27:58PM +0000, Michael D Kinney wrote: > > > Hi Gerd, > > > > > > Thanks for working on this. I raised this topic in the new TianoCore > build > > and CI > > > meeting yesterday because the intrinsic libs are closely tied to the > > toolchains > > > supported by TianoCore. > > > > > > I agree with the concept of moving the compiler intrinsics to a libra= ry > in the > > MdePkg. > > > > > > + Sean Brogan > > > > > > Sean mentioned that he has some addition work on intrinsic libs for > Visual > > Studio > > > toolchains. It would be good to see if this set of changes is aligne= d > with > > those > > > efforts. > > > > Having a single place where all compiler intrinsics are located should > > simplify this kind of changes. > > > > > I see a few items that might be good to clean up at some point > > > * fltused should go into its own file. Not related to the strcmp() A= PI > > > * I see size_t defined in multiple places using different mappings. > Would > > be good to > > > define that in a single location. > > > > Yes, sure. Both are valid points. > > > > I see this series as first step, consolidating the existing code in a > > singe place with (almost) no actual code changes. There surely will be > > incremental improvements and cleanups later on. I will need a few more > > intrinsic functions when moving edk2 to openssl 3.0 for example. > > > > take care, > > Gerd > > > > > >=20 > > > --=20 Pedro Falcato --00000000000096aa3505da746e58 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Something I've just = noticed: edk2-libc also ships its own intrinsics (https://github.= com/tianocore/edk2-libc/blob/master/StdLib/LibC/CRT/Gcc.c)
I know edk2-libc is not part of the core edk2 repo but I think= we should keep this in mind when this patch set gets merged.

On F= ri, Mar 18, 2022 at 1:27 AM gaoliming <gaoliming@byosoft.com.cn> wrote:
Gerd:
=C2=A0 I suggest to submit the different BZs for those tasks. This patch se= t is
the first stage. Future enhancement can be added later.

=C2=A0 If no more comment for the first stage, this patch set can be merged=
first.

Thanks
Liming
> -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6-----
> =E5=8F=91=E4=BB=B6=E4=BA=BA: Gerd Hoffmann <kraxel@redhat.com>
> =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B43=E6=9C=8816=E6=97= =A5 17:46
> =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; michael.d.kinney@intel.com
> =E6=8A=84=E9=80=81: Sean Brogan <sean.brogan@microsoft.com>; Lu, Xiaoyu1=
> <xiaoyu1.= lu@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; Rebecca Cran
> <rebecca@bsd= io.com>; James Bottomley <jejb@linux.ibm.com>; Sami
> Mujawar <= Sami.Mujawar@arm.com>; Justen, Jordan L
> <jor= dan.l.justen@intel.com>; Aktas, Erdem <erdemaktas@google.com>; Yao,
> Jiewen <j= iewen.yao@intel.com>; Supreeth Venkatesh
> <su= preeth.venkatesh@arm.com>; Boeuf, Sebastien
> <seb= astien.boeuf@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>; Liu,
> Zhiguang <zhiguang.liu@intel.com>; Maciej Rabeda
> <maciej.rabeda@linux.intel.com>; Ma, Maurice <maurice.ma@intel.com>;
> Andrew Fish <a= fish@apple.com>; Ard Biesheuvel
> <a= rdb+tianocore@kernel.org>; Tom Lendacky <thomas.lendacky@amd.com>;
> Peter Grehan <grehan@freebsd.org>; Jiang, Guomin
> <guomin= .jiang@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>;
> Chen, Christine <yuwei.chen@intel.com>; You, Benjamin
> <benjam= in.you@intel.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>;
> Gao, Liming <gaoliming@byosoft.com.cn>; Xu, Wei6 <wei6.xu@intel.com>;
> Wang, Jian J <jian.j.wang@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>;
Fu,
> Siyuan <si= yuan.fu@intel.com>; Dong, Guo <guo.dong@intel.com>;
> kilian_k= egel@hotmail.com; Chang, Abner <abner.chang@hpe.com>; Oliver
> Steffen <o= steffen@redhat.com>; Leif Lindholm <quic_llindhol@quicinc.com>;
> Brijesh Singh <brijesh.singh@amd.com>; Xu, Min M <min.m.xu@intel.com>;
> Ni, Ray <ray.= ni@intel.com>; Alexei Fedorov <Alexei.Fedorov@arm.com>;
> Julien Grall <j= ulien@xen.org>; Wang, Nickle <nickle.wang@hpe.com>; Pawel
> Polawski <= ppolawsk@redhat.com>; Anthony Perard
> <ant= hony.perard@citrix.com>
> =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH 0/3] [RFC] consolidate com= piler intrinsics
>
> On Tue, Mar 15, 2022 at 03:27:58PM +0000, Michael D Kinney wrote:
> > Hi Gerd,
> >
> > Thanks for working on this.=C2=A0 I raised this topic in the new = TianoCore
build
> and CI
> > meeting yesterday because the intrinsic libs are closely tied to = the
> toolchains
> > supported by TianoCore.
> >
> > I agree with the concept of moving the compiler intrinsics to a l= ibrary
in the
> MdePkg.
> >
> > + Sean Brogan
> >
> > Sean mentioned that he has some addition work on intrinsic libs f= or
Visual
> Studio
> > toolchains.=C2=A0 It would be good to see if this set of changes = is aligned
with
> those
> > efforts.
>
> Having a single place where all compiler intrinsics are located should=
> simplify this kind of changes.
>
> > I see a few items that might be good to clean up at some point > > * fltused should go into its own file.=C2=A0 Not related to the s= trcmp() API
> > * I see size_t defined in multiple places using different mapping= s.
Would
> be good to
> >=C2=A0 =C2=A0define that in a single location.
>
> Yes, sure.=C2=A0 Both are valid points.
>
> I see this series as first step, consolidating the existing code in a<= br> > singe place with (almost) no actual code changes.=C2=A0 There surely w= ill be
> incremental improvements and cleanups later on.=C2=A0 I will need a fe= w more
> intrinsic functions when moving edk2 to openssl 3.0 for example.
>
> take care,
>=C2=A0 =C2=A0Gerd










--
Pedro Falcato
--00000000000096aa3505da746e58--