[edk2-devel] IntrinsicsLib - Was: [CryptoPkg] Add CC flags for MSVC ARM on IntrinsicLib

Leif Lindholm leif at nuviainc.com
Thu Oct 8 11:33:24 UTC 2020


So, here is the second email I promised... (Dropping CryptoPkg
maintainers, adding stewards).

We have some (to my mind) spurious rules in TianoCore - some
documented in the Coding Style document, and some documented nowhere
yet continuously enforced - with the common factor of attempting to
prevent calls out to compiler intrinsic functions being generated for
things such as:
- structure assignment or comparison
- *some* 64-bit arithmetic and logic operations

Now, on the ARM side we bit the bullet in the early days and
Implemented ArmPkg/Library/CompilerIntrinsicsLib to cope with
this. But we still end up with partial duplication of this nested
underneath CryptoPkg (and working around parts of the CryptoPkg one in
the ArmPkg one).

Now, the various bits of ArmPkg should start migrating into MdePkg
over time, and the CompilerIntrinsicsLibrary as part of that.
Could we reconsider this *partial* ban on intrinsic-generating valid C
in Ia32/X64, and create a single unified intrinsics library?

/
    Leif

On Wed, Oct 07, 2020 at 11:41:45 -0700, matthewfcarlson at gmail.com wrote:
> From: Matthew Carlson <matthewfcarlson at gmail.com>
> 
> This adds compiler flags for AARCH64 and ARM for the Visual Studio
> compilers to the IntrinsicLib inf.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2821
> 
> Cc: Jiewen Yao <jiewen.yao at intel.com>
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu at intel.com>
> Cc: Guomin Jiang <guomin.jiang at intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel at arm.com>
> Cc: Leif Lindholm <leif at nuviainc.com>
> Signed-off-by: Matthew Carlson <matthewfcarlson at gmail.com>
> ---
>  CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf b/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
> index fcbb93316cf7..ad05b3a000c4 100644
> --- a/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
> +++ b/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
> @@ -64,4 +64,6 @@
>     MSFT:RELEASE_*_IA32_CC_FLAGS           == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF
>     MSFT:DEBUG_*_X64_CC_FLAGS              == /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
>     MSFT:RELEASE_*_X64_CC_FLAGS            == /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF
> -  INTEL:*_*_*_CC_FLAGS                    =  /Oi-
> +   MSFT:DEBUG_*_AARCH64_CC_FLAGS          == /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
> +   MSFT:RELEASE_*_AARCH64_CC_FLAGS        == /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF
> +   INTEL:*_*_*_CC_FLAGS                    =  /Oi-
> -- 
> 2.28.0.vfs.0.0
> 


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





More information about the edk2-devel-archive mailing list