public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: Kilian Kegel <kilian_kegel@outlook.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"jiewen.yao@intel.com" <jiewen.yao@intel.com>,
	"Gao, Liming" <gaoliming@byosoft.com.cn>,
	"Lu, Xiaoyu1" <xiaoyu1.lu@intel.com>,
	"Feng, Bob C" <bob.c.feng@intel.com>,
	'Rebecca Cran' <rebecca@bsdio.com>,
	'James Bottomley' <jejb@linux.ibm.com>,
	'Sami Mujawar' <Sami.Mujawar@arm.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	'Supreeth Venkatesh' <supreeth.venkatesh@arm.com>,
	"Boeuf, Sebastien" <sebastien.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' <afish@apple.com>,
	'Ard Biesheuvel' <ardb+tianocore@kernel.org>,
	'Tom Lendacky' <thomas.lendacky@amd.com>,
	'Peter Grehan' <grehan@freebsd.org>,
	'Sean Brogan' <sean.brogan@microsoft.com>,
	"Jiang, Guomin" <guomin.jiang@intel.com>,
	'Bret Barkelew' <Bret.Barkelew@microsoft.com>,
	"Chen, Christine" <yuwei.chen@intel.com>,
	"You, Benjamin" <benjamin.you@intel.com>,
	"Schaefer, Daniel" <daniel.schaefer@hpe.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Xu, Wei6" <wei6.xu@intel.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Wu, Jiaxin" <jiaxin.wu@intel.com>,
	"Fu, Siyuan" <siyuan.fu@intel.com>,
	"Dong, Guo" <guo.dong@intel.com>,
	"kilian_kegel@hotmail.com" <kilian_kegel@hotmail.com>,
	"Chang, Abner" <abner.chang@hpe.com>,
	'Oliver Steffen' <osteffen@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' <julien@xen.org>,
	"Wang, Nickle" <nickle.wang@hpe.com>,
	'Pawel Polawski' <ppolawsk@redhat.com>,
	'Anthony Perard' <anthony.perard@citrix.com>
Subject: Re: [edk2-devel] [PATCH 0/3] [RFC] consolidate compiler intrinsics
Date: Wed, 2 Mar 2022 11:10:14 +0100	[thread overview]
Message-ID: <20220302101014.rdh2aeksifrj3zqe@sirius.home.kraxel.org> (raw)
In-Reply-To: <DBAP190MB095136DF8AE3D871F776D797EB039@DBAP190MB0951.EURP190.PROD.OUTLOOK.COM>

On Wed, Mar 02, 2022 at 08:39:28AM +0000, Kilian Kegel wrote:
> Hi Gerd,
> 
> additionally I would suggest once more to adjust the DLINK_FLAGS in tools_def.txt to hold CompilerNameINTRIN32/64.LIB as a search library
> as already introduced in https://edk2.groups.io/g/devel/message/86072?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Ckilian%2C20%2C2%2C0%2C87479913
> (here is the entire thread https://edk2.groups.io/g/devel/message/86334?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Cposterid%3A2193857%2C20%2C2%2C0%2C87479913)
> 
> In that case you don’t need to take the IntrinsicLibrary into the .INF file, because the intrinsic library is in the compiler’s library search path.
> That has annoyed UEFI developers world wide for more that a decade.

Having to add the IntrinsicLibrary to the .inf file is annoying indeed.

Just using the compiler intrinsics doesn't work in all cases though,
so I see no way around providing our own intrinsics library.

> With your solution can you compile + link the body of main() given below in a PEI driver on all targets?
> Really?

Nope.  These patches simply move the existing intrinsics from ArmPkg and
CryptoPkg as starting point.  They are known to be incomplete.

I expect we'll add more functions as needed in the future.

We can surely debate if and how we can use the compiler's intrinsic
library instead our own implementation for the cases where it works.

Having a core intrinsics lib should actually make that kind changes
easier,  There will be one central place where you can tweak which
intrinsic functions are provided by edk2, so coordinating that with
DLINK_FLAGS updates should be easier than today.

take care,
  Gerd


  reply	other threads:[~2022-03-02 10:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01  7:18 [PATCH 0/3] [RFC] consolidate compiler intrinsics Gerd Hoffmann
2022-03-01  7:18 ` [PATCH 1/3] MdePkg: promote CompilerIntrinsicsLib from ArmPkg to MdePkg Gerd Hoffmann
2022-03-01  7:18 ` [PATCH 2/3] MdePkg/CompilerIntrinsicsLib: fix msft sources for x64 Gerd Hoffmann
2022-03-01  7:18 ` [PATCH 3/3] MdePkg/CompilerIntrinsicsLib: move ia32 intrinsics and strcmp Gerd Hoffmann
2022-03-02  2:06 ` 回复: [edk2-devel] [PATCH 0/3] [RFC] consolidate compiler intrinsics gaoliming
2022-03-02  2:16   ` Yao, Jiewen
2022-03-02  8:39     ` Kilian Kegel
2022-03-02 10:10       ` Gerd Hoffmann [this message]
2022-03-02  6:12 ` Ard Biesheuvel
2022-03-15 12:22 ` Gerd Hoffmann
2022-03-15 15:27   ` Michael D Kinney
2022-03-16  9:45     ` [edk2-devel] " Gerd Hoffmann
2022-03-18  1:26       ` 回复: " gaoliming
2022-03-18  1:54         ` Pedro Falcato
2022-03-15 17:08   ` Pedro Falcato
2022-03-16 10:02     ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220302101014.rdh2aeksifrj3zqe@sirius.home.kraxel.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox