[edk2-devel] [PATCH 0/3] [RFC] consolidate compiler intrinsics

Pedro Falcato pedro.falcato at gmail.com
Tue Mar 15 17:08:55 UTC 2022


Gerd,

Have you considered just pulling in LLVM's compiler-rt builtins? It
implements essentially everything we'll ever need for a GNU-like toolchain,
for all the architectures we support, and also has unit tests (
https://github.com/llvm/llvm-project/tree/main/compiler-rt/test/builtins/Unit
).

I think it would be a good idea considering it's guaranteed to be correct
and always implements whatever clang requires (and AFAIK clang always
requires what gcc requires).

Best regards,
Pedro

On Tue, Mar 15, 2022 at 12:23 PM Gerd Hoffmann <kraxel at redhat.com> wrote:

> On Tue, Mar 01, 2022 at 08:18:17AM +0100, Gerd Hoffmann wrote:
> > This is an attept to start cleaning up the messy compiler intrinsics
> > situation.  Today we don't have a core intrinsics library, resulting
> > in everybody creating their own.  ArmPkg has one, CryptoPkg has one.
> > I'm sure there are many more.
> >
> > This doesn't make sense.  Given we can't avoid compiler intrinsics (as
> > proven by the existence of those libraries) we should better have them
> > as core library so we have to maintain a single version only.
> >
> > Given we already have BaseIoLibIntrinsic in MdePkg we can place the
> > compiler intrinsics there too.  This little patch series does just that:
> > It moves over the existing ArmPkg intrinsics, fixes them to build on
> > non-arm too, and adds additional bits from the CryptoPkg intrinsics.
>
> Ping.  How go forward with this?  I've posted it as RFC because
> I expected a more controversial discussion.  But seems everybody
> agrees this is a step into the right direction.
>
> So just merge this as-is?
>
> Yes, it passed CI (https://github.com/tianocore/edk2/pull/2542).
>
> take care,
>   Gerd
>
>
>
> 
>
>
>

-- 
Pedro Falcato


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#87603): https://edk2.groups.io/g/devel/message/87603
Mute This Topic: https://groups.io/mt/89471210/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20220315/a17c2e80/attachment.htm>


More information about the edk2-devel-archive mailing list