<div dir="ltr">Gerd,<div><br></div><div>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 (<a href="https://github.com/llvm/llvm-project/tree/main/compiler-rt/test/builtins/Unit">https://github.com/llvm/llvm-project/tree/main/compiler-rt/test/builtins/Unit</a>).</div><div><br></div><div>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).</div><div> </div><div>Best regards,</div><div>Pedro</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 15, 2022 at 12:23 PM Gerd Hoffmann <<a href="mailto:kraxel@redhat.com">kraxel@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Mar 01, 2022 at 08:18:17AM +0100, Gerd Hoffmann wrote:<br>
> This is an attept to start cleaning up the messy compiler intrinsics<br>
> situation.  Today we don't have a core intrinsics library, resulting<br>
> in everybody creating their own.  ArmPkg has one, CryptoPkg has one.<br>
> I'm sure there are many more.<br>
> <br>
> This doesn't make sense.  Given we can't avoid compiler intrinsics (as<br>
> proven by the existence of those libraries) we should better have them<br>
> as core library so we have to maintain a single version only.<br>
> <br>
> Given we already have BaseIoLibIntrinsic in MdePkg we can place the<br>
> compiler intrinsics there too.  This little patch series does just that:<br>
> It moves over the existing ArmPkg intrinsics, fixes them to build on<br>
> non-arm too, and adds additional bits from the CryptoPkg intrinsics.<br>
<br>
Ping.  How go forward with this?  I've posted it as RFC because<br>
I expected a more controversial discussion.  But seems everybody<br>
agrees this is a step into the right direction.<br>
<br>
So just merge this as-is?<br>
<br>
Yes, it passed CI (<a href="https://github.com/tianocore/edk2/pull/2542" rel="noreferrer" target="_blank">https://github.com/tianocore/edk2/pull/2542</a>).<br>
<br>
take care,<br>
  Gerd<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Pedro Falcato</div></div>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/87603">View/Reply Online (#87603)</a> |    |  <a target="_blank" href="https://groups.io/mt/89471210/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>