UNARY MUL node and that node has a usable index expression, we now try to
rewrite the base into a register so that oreg2() will produce a
doubly-indexed OREG.
SCCS-vsn: old/pcc/mip/reader.c 4.7
-static char *sccsid ="@(#)reader.c 4.6 (Berkeley) %G%";
+static char *sccsid ="@(#)reader.c 4.7 (Berkeley) %G%";
#endif lint
# include "pass2.h"
#endif lint
# include "pass2.h"
-order(p,cook) NODE *p; {
+order(p,cook) register NODE *p; {
register o, ty, m;
int m1;
int cookie;
register o, ty, m;
int m1;
int cookie;
+ register NODE *p1, *p2;
p->in.op = FREE;
return;
}
p->in.op = FREE;
return;
}
+#ifdef R2REGS
+ /* try to coax a tree into a doubly indexed OREG */
+ p1 = p->in.left;
+ if( p1->in.op == PLUS ) {
+ if( ISPTR(p1->in.left->in.type) &&
+ offset(p1->in.right, tlen(p)) >= 0 ) {
+ order( p1->in.left, INAREG|INTAREG );
+ goto again;
+ }
+ if( ISPTR(p1->in.right->in.type) &&
+ offset(p1->in.left, tlen(p)) >= 0 ) {
+ order( p1->in.right, INAREG|INTAREG );
+ goto again;
+ }
+ }
+#endif
offstar( p->in.left );
goto again;
offstar( p->in.left );
goto again;