]> gcc.gnu.org Git - gcc.git/commit
Bugfix to allow testsuite/gm2/pim/pass/arraybool.mod to compile on ppc64le
authorGaius Mulley <gaiusmod2@gmail.com>
Sun, 15 Jan 2023 13:13:40 +0000 (13:13 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Sun, 15 Jan 2023 13:13:40 +0000 (13:13 +0000)
commitc8f2be5d437e2fb1d91b3ef6a8ca2093ba7e2091
treee7d1426dfca73568830067d66e4cdb8389adc454
parent4dc4584b6079ac801ed5f0c79d335891821dbb3b
Bugfix to allow testsuite/gm2/pim/pass/arraybool.mod to compile on ppc64le

This bug is exposed on the ppc64le platform.  The expression
parser P3Build.bnf (and PHBuild.bnf) BuiltNot omitted to record
the current token position on the quad stack.  The patch changes
all occurances of NEW to newBoolFrame to ensure that the tokenno
recorded in the bool frame is set to a sensible value.
BuildNot is fixed and improved to generate a virtual token
recording the position of the subexpression.

gcc/m2/ChangeLog:

* gm2-compiler/M2LexBuf.mod (isSrcToken): Add block comment.
Remove dead code.
* gm2-compiler/M2Quads.def (BuildNot): Add notTokPos parameter.
* gm2-compiler/M2Quads.mod (BuildNot): Add notTokPos parameter.
Create and push virtual token.
(PopBooltok): New procedure.
(PushBooltok): New procedure.
(PushBool): Re-implement using PushBooltok.
(PopBool): Re-implement using PopBooltok.
* gm2-compiler/P3Build.bnf (ConstFactor): Record token
position of NOT.
(Factor): Record token position of NOT.
* gm2-compiler/PHBuild.bnf (ConstFactor): Record token
position of NOT.
(Relation): Push token position.
(UnaryOrConstTerm): Push token position.
(AddOperator): Push token position.
(MulOperator): Push token position.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-compiler/M2LexBuf.mod
gcc/m2/gm2-compiler/M2Quads.def
gcc/m2/gm2-compiler/M2Quads.mod
gcc/m2/gm2-compiler/P3Build.bnf
gcc/m2/gm2-compiler/PHBuild.bnf
This page took 0.062152 seconds and 6 git commands to generate.