Enable conditional expressions in splitting coercions.

ncgg has parsed the optional conditional expression (optexpr) of each
splitting coercion since commit 72b83cc in 1985; but for almost 33
years, ncg has ignored the expression in c2_expr.

Few tables had conditional coercions (I only found them in arm and
m68020), and no tables had conditional splitting coercions, so this
only becomes a problem now as I try to add a conditional splitting
coercion to powerpc.
This commit is contained in:
George Koehler 2017-12-18 20:39:56 -05:00
parent 5e99baabdf
commit 24abaf6a25

View file

@ -518,7 +518,7 @@ int split(token_p tp, int *ip, int ply, int toplevel) {
int tpl;
for (cp=c2coercs;cp->c2_texpno>=0; cp++) {
if (!match(tp,&machsets[cp->c2_texpno],0))
if (!match(tp,&machsets[cp->c2_texpno],cp->c2_expr))
continue;
ok=1;
for (i=0; ok && i<cp->c2_nsplit;i++) {