From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.web11.9857.1602156813743330168 for ; Thu, 08 Oct 2020 04:33:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=j03H6Wi2; spf=pass (domain: nuviainc.com, ip: 209.85.221.48, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f48.google.com with SMTP id y12so827854wrp.6 for ; Thu, 08 Oct 2020 04:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=H4iOrLwf0RYdRoVGald2wNWQ5llIyHpH4wr7veLUHEg=; b=j03H6Wi2d5YxF7XdWgCsH3xdO7BacwIirEE4XLbboP5ZkdKT4kkGgxQt4ej0mwnMgz SuOfcD6nghaqOuboOg8BvZR5R4154jlIlTnXkLfsL+j5mERfaSQCVa0zd3RWdTCjO8wb 6N3bo+DkBeGsGpbN8UsL10S//iIm+qiKEzCS6DO+Ok7sVMJZVFwSbwMBt2cId9+vA2jn o9HVXjv9gpfkHet/N5yTIb9SzF9+Nv0TGiVqmtduNArIhmh64SvIm9+JxXitLMcz0adM rUkIzk+zMfwYOBtCwTz4ADCRy+NXd/5H9FzRsmO6SmA8n6Sg27DMT848Py8VctG7Z8mg Ki5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=H4iOrLwf0RYdRoVGald2wNWQ5llIyHpH4wr7veLUHEg=; b=DwgMkKJABr8CQwdiYLViPo7dtgazG7F9R2vdLBg3am+WQPCC35fQQoAvvfeGK1jsUI pyH0/tKgpF5mV5RhOFVh7jXqfldMiJsyI5ewXoCYiraK6BrhC6SKPcBQnYxmovchSYIa XGeiDRsUI/FrdcYaSlQbUVDMRlC7Ej+d9jpwLwd4Z4129MzjpPvCXBhGVW/4az+G0PD4 lYZu4LUB1LdtJYMz3Z4VFG67fXOPaAAAIMAoibhh4tKwA2EvmzsYR2HbZyIuFRz9waMB /5TqtZnZei1jKZRa4Ap0vkBIwCzzPO8CAwqteW33Gk9R3FldPyrvrHkeEv+RYShMeBZe XHXQ== X-Gm-Message-State: AOAM532syVr5VmE9e/PcUZ9Jb4Ovka760gN7VRRemWfTQEYVH46Kekou VUY1EVqQXvinWyinUaWSwxC0bA== X-Google-Smtp-Source: ABdhPJxh9B4iJnvsrK7lG1VnUt/qBonRpgpJrlwIlLmLsWuxNhO3A65ci+59NH85cn7JEc6TrY9BbQ== X-Received: by 2002:adf:db52:: with SMTP id f18mr8721986wrj.397.1602156812204; Thu, 08 Oct 2020 04:33:32 -0700 (PDT) Return-Path: Received: from vanye (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id t124sm6936256wmg.31.2020.10.08.04.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 04:33:31 -0700 (PDT) Date: Thu, 8 Oct 2020 12:33:24 +0100 From: "Leif Lindholm" To: matthewfcarlson@gmail.com Cc: devel@edk2.groups.io, Ard Biesheuvel , Andrew Fish , Laszlo Ersek , Michael D Kinney Subject: IntrinsicsLib - Was: [CryptoPkg] Add CC flags for MSVC ARM on IntrinsicLib Message-ID: <20201008113324.GV5623@vanye> References: <20201007184145.5232-1-matthewfcarlson@gmail.com> <20201007184145.5232-2-matthewfcarlson@gmail.com> MIME-Version: 1.0 In-Reply-To: <20201007184145.5232-2-matthewfcarlson@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > > 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 > Cc: Jian J Wang > Cc: Xiaoyu Lu > Cc: Guomin Jiang > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Signed-off-by: Matthew Carlson > --- > 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 >