--- cci/usr/src/lib/fpcc/local2.c 2019/07/28 12:24:19 1.1 +++ cci/usr/src/lib/fpcc/local2.c 2019/07/28 12:24:49 1.1.1.2 @@ -6,6 +6,7 @@ int ftlab1, ftlab2; /* a lot of the machine dependent parts of the second pass */ # define BITMASK(n) ((1L<in.type == UCHAR || p->in.type == CHAR) # ifndef ONEPASS where(c){ @@ -437,6 +438,28 @@ zzzcode( p, c ) register NODE *p; { } break; + case 'X': /* multiplication for short and char */ + if (ISUNSIGNED(p->in.left->in.type)) + printf("\tmovz"); + else + printf("\tcvt"); + zzzcode(p, 'L'); + printf("l\t"); + adrput(p->in.left); + printf(","); + adrput(&resc[0]); + printf("\n"); + if (ISUNSIGNED(p->in.right->in.type)) + printf("\tmovz"); + else + printf("\tcvt"); + zzzcode(p, 'R'); + printf("l\t"); + adrput(p->in.right); + printf(","); + adrput(&resc[1]); + printf("\n"); + return; default: cerror( "illegal zzzcode" ); } @@ -914,7 +937,9 @@ hardops(p) register NODE *p; { t = p->in.type; t1 = p->in.left->in.type; t2 = p->in.right->in.type; - if ( t1 != UNSIGNED && (t2 != UNSIGNED)) return; + + if (!((ISUNSIGNED(t1) && !(ISUNSIGNED(t2))) || + ( t2 == UNSIGNED))) return; /* need to rewrite tree for ASG OP */ /* must change ASG OP to a simple OP */