public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <leif@nuviainc.com>
To: matthewfcarlson@gmail.com
Cc: devel@edk2.groups.io, Ard Biesheuvel <ard.biesheuvel@arm.com>,
	Andrew Fish <afish@apple.com>, Laszlo Ersek <lersek@redhat.com>,
	Michael D Kinney <michael.d.kinney@intel.com>
Subject: IntrinsicsLib - Was: [CryptoPkg] Add CC flags for MSVC ARM on IntrinsicLib
Date: Thu, 8 Oct 2020 12:33:24 +0100	[thread overview]
Message-ID: <20201008113324.GV5623@vanye> (raw)
In-Reply-To: <20201007184145.5232-2-matthewfcarlson@gmail.com>

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@gmail.com wrote:
> From: Matthew Carlson <matthewfcarlson@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@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Cc: Guomin Jiang <guomin.jiang@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Signed-off-by: Matthew Carlson <matthewfcarlson@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
> 

      parent reply	other threads:[~2020-10-08 11:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 18:41 [PATCH v1 0/1] [CryptoPkg] Add CC flags to IntrinsicLib Matthew Carlson
2020-10-07 18:41 ` [PATCH v1 1/1] [CryptoPkg] Add CC flags for MSVC ARM on IntrinsicLib Matthew Carlson
2020-10-07 18:44   ` Ard Biesheuvel
2020-10-08  0:26     ` [edk2-devel] " Yao, Jiewen
2020-10-08 11:13   ` Leif Lindholm
2020-10-08 11:33   ` Leif Lindholm [this message]

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=20201008113324.GV5623@vanye \
    --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