summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/ifcompiler/initCompiler.y
diff options
context:
space:
mode:
authorCamVan Nguyen <ctnguyen@us.ibm.com>2012-06-19 00:51:48 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-06-26 13:53:55 -0500
commit2ca475148bef81d13f6d4bdfda376691c3a0f9d1 (patch)
tree328c58898b03b480d1670a1ff7682e7473d9a3e2 /src/usr/hwpf/ifcompiler/initCompiler.y
parent280e4323aaed2d4d58ea738f9bd004281b606067 (diff)
downloadblackbird-hostboot-2ca475148bef81d13f6d4bdfda376691c3a0f9d1.tar.gz
blackbird-hostboot-2ca475148bef81d13f6d4bdfda376691c3a0f9d1.zip
SCOM Initfile: Ability to do bitwise OR and AND operations
Change-Id: Ie3836bc2e3ca580761c71ea810cd9c6c55da54b6 RTC: 43757 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1220 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/ifcompiler/initCompiler.y')
-rwxr-xr-xsrc/usr/hwpf/ifcompiler/initCompiler.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/usr/hwpf/ifcompiler/initCompiler.y b/src/usr/hwpf/ifcompiler/initCompiler.y
index 62f534016..39254c2b3 100755
--- a/src/usr/hwpf/ifcompiler/initCompiler.y
+++ b/src/usr/hwpf/ifcompiler/initCompiler.y
@@ -41,6 +41,7 @@
// in the scom_data column
// camvanng 06/11/12 Ability to do logical operations with attribute columns
// Fix shift/reduce warnings from yacc
+// camvanng 06/15/12 Ability to do bitwise OR and AND operations
// End Change Log *********************************************************************************
/**
* @file initCompiler.y
@@ -263,6 +264,8 @@ scomdexpr: INIT_INTEGER { $$= new init::Rpn($1,yyscomlist->get_s
| scomdexpr '*' scomdexpr { $$ = $1->push_merge($3,MULT); }
| scomdexpr '/' scomdexpr { $$ = $1->push_merge($3,DIVIDE); }
| scomdexpr '%' scomdexpr { $$ = $1->push_merge($3,MOD); }
+ | scomdexpr '&' scomdexpr { $$ = $1->push_merge($3,BITWISEAND); }
+ | scomdexpr '|' scomdexpr { $$ = $1->push_merge($3,BITWISEOR); }
| '!' scomdexpr { $$ = $2->push_op(NOT); }
| '(' scomdexpr ')' { $$ = $2; }
;
@@ -330,6 +333,8 @@ expr: INIT_INTEGER { $$= new init::Rpn($1,yyscomlist->get_s
| expr '*' expr { $$ = $1->push_merge($3,MULT); }
| expr '/' expr { $$ = $1->push_merge($3,DIVIDE); }
| expr '%' expr { $$ = $1->push_merge($3,MOD); }
+ | expr '&' expr { $$ = $1->push_merge($3,BITWISEAND); }
+ | expr '|' expr { $$ = $1->push_merge($3,BITWISEOR); }
| '!' expr { $$ = $2->push_op(NOT); }
| '(' expr ')' { $$ = $2; }
;
OpenPOWER on IntegriCloud