From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6C85D21129479 for ; Tue, 11 Sep 2018 22:42:38 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2018 22:42:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,363,1531810800"; d="scan'208";a="262734034" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 11 Sep 2018 22:42:38 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 11 Sep 2018 22:42:38 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 11 Sep 2018 22:42:37 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.143]) by shsmsx102.ccr.corp.intel.com ([169.254.2.226]) with mapi id 14.03.0319.002; Wed, 12 Sep 2018 13:42:34 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Shaw, Kevin W" Thread-Topic: [Patch] Build spec: correct the Operator used in the expression for Table 12 Thread-Index: AQHURoBsnlp7HtKrAkyWj1Viy4QvBKTsKcjA Date: Wed, 12 Sep 2018 05:42:33 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2F61B0@SHSMSX104.ccr.corp.intel.com> References: <1536306973-22076-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1536306973-22076-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] Build spec: correct the Operator used in the expression for Table 12 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2018 05:42:39 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Zhu, Yonghong >Sent: Friday, September 07, 2018 3:56 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Kinney, Michael D >; Shaw, Kevin W >Subject: [Patch] Build spec: correct the Operator used in the expression f= or >Table 12 > >Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3D598 >Cc: Liming Gao >Cc: Michael Kinney >Cc: Kevin W Shaw >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Yonghong Zhu >--- > .../82_auto-generation_process.md | 34 +++++++++++------= ----- > README.md | 1 + > 2 files changed, 18 insertions(+), 17 deletions(-) > >diff --git a/8_pre-build_autogen_stage/82_auto-generation_process.md >b/8_pre-build_autogen_stage/82_auto-generation_process.md >index 6ce1710..9b61e0d 100644 >--- a/8_pre-build_autogen_stage/82_auto-generation_process.md >+++ b/8_pre-build_autogen_stage/82_auto-generation_process.md >@@ -657,15 +657,11 @@ Refer to the DSC and FDF file form specifications >"_Conditional Directive > Blocks_" section for additional details of how directives must be process= ed. > > #### 8.2.4.6 Expressions > > Expressions can be used in conditional directive comparison statements an= d >in >-value fields for PCDs in the DSC and FDF files. >- >-********** >-**Note:** Expressions are not supported in the INF and DEC files. >-********** >+value fields for PCDs in the meta-data files. > > Expressions follow C relation, equality, logical and bitwise precedence a= nd > associativity. Not all C operators are supported, only operators in the > following list can be used. > >@@ -681,22 +677,26 @@ Use of parenthesis is encouraged to remove >ambiguity. > Additional scripting style operators may be used in place of C operators = as > shown in the table below. > > ###### Table 12 Operator Precedence and Supported Operands > >-| Operator | Use with Data Types | = Notes >| Priority | >-| -------------------------------------------- | --------------------- | = ---------------------- >--------------------------------------------------------------------------= --------------------- >--------------------------------------------------------------------------= --------------------- >--------- | -------- | >-| `or`, `OR`, || | Number, Boolean | >| Lowest | >-| `and`, `AND`, `&&` | Number, Boolean | >| | >-| | | Number, Boolean | = Bitwise OR >| | >-| `^`, `xor`, `XOR` | Number, Boolean | = Exclusive OR >| | >-| `&` | Number, Boolean | = Bitwise AND >| | >-| `=3D=3D`, `!=3D`, `EQ`, `NE`, `IN` | All = | The IN operator can only be >used to test a quoted unary literal string for membership in a list. >| | >-| | | = Space characters must be used before >and after the letter operators Strings compared to boolean or numeric valu= es >using "=3D=3D" or "EQ" will always return FALSE, while using the "!=3D" or= "NE" >operators will always return TRUE | | >-| `<=3D`, `>=3D`, `<`, `>`, `LE`, `GE`, `LT`, `GT` | All = | Space characters must >be used before and after the letter operators. >| | >-| `+`, `-` | Number, Boolean | = Cannot be used with >strings - the system does not automatically do concatenation. Tools should >report a warning message if these operators are used with both a boolean >and number value | | >-| `!`, `not`, `NOT` | Number, Boolean | >| Highest | >+| Operator | Use with Data Types | No= tes >| Priority | >+| -------------------------------------------- | ------------------- | --= --------------------- >-------------------------------------------------- -----------------= ------------------------ >-------------------------------- | -------- | >+| `? :` | All | Co= nditional operator >| Lowest | >+| `or`, `OR`, || | Number, Boolean | >| | >+| `XOR`, `xor` | Number, Boolean | >| | >+| `and`, `AND`, `&&` | Number, Boolean | >| | >+| | | Number, Boolean | Bi= twise OR >| | >+| `^` | Number, Boolean | Bi= twise XOR >| | >+| `&` | Number, Boolean | Bi= twise AND >| | >+| `=3D=3D`, `!=3D`, `EQ`, `NE`, `IN` | All = | The IN operator can only be >used to test a quoted unary literal string for membership in a list. >| | >+| | | St= rings compared to boolean or >numeric values using "=3D=3D" or "EQ" will always return FALSE, while usin= g the >"!=3D" or "NE" operators will always return TRUE | | >+| `<=3D`, `>=3D`, `<`, `>`, `LE`, `GE`, `LT`, `GT` | All = | >| | >+| `<<`, `>>` | Number, Boolean | >| | >+| `+`, `-` | Number, Boolean | Ca= nnot be used with >strings - the system does not automatically do concatenation. >| | >+| `*`, `/`, `%` | Number, Boolean | Ca= nnot be used with >strings = | | >+| `!`, `not`, `NOT`, `~` | Number, Boolean | >| Highest | > > The `IN` operator can only be used to test a literal string against eleme= nts > in the following global variables: > > **_$(FAMILY)_** >diff --git a/README.md b/README.md >index a370537..637a4a4 100644 >--- a/README.md >+++ b/README.md >@@ -226,5 +226,6 @@ Copyright (c) 2008-2017, Intel Corporation. All rights >reserved. > | | Clarify structure PCD field value assignment precedence >| | > | | Update description for build handles PCDs for SKU support >| | > | | Add statement about module scoped `` section overrid= e >scope >| | > | | Add !error statement section >| | > | | [#1110](https://bugzilla.tianocore.org/show_bug.cgi?id=3D1= 110) >Extend exclamation statement's keyword to case-insensitive >| | >+| | [#598](https://bugzilla.tianocore.org/show_bug.cgi?id=3D59= 8) update >supported operators in 8.2.4.6 Expressions >| | >-- >2.6.1.windows.1