diff options
author | Anders Magnusson <ragge@cvs.openbsd.org> | 2007-12-09 18:40:30 +0000 |
---|---|---|
committer | Anders Magnusson <ragge@cvs.openbsd.org> | 2007-12-09 18:40:30 +0000 |
commit | 035b85093302a8482e85b98e102c4360f871d7ce (patch) | |
tree | 71fa309ec2e5f0be27fcb9cdd135270017e7f893 /usr.bin | |
parent | 8373c6a0f9262c1718d088e9c8e07db680774d69 (diff) |
Updates from master repo:
- Only check for flags already set if BITYPE.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/pcc/mip/reader.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/pcc/mip/reader.c b/usr.bin/pcc/mip/reader.c index 29c4d5f0bbd..9629b297a03 100644 --- a/usr.bin/pcc/mip/reader.c +++ b/usr.bin/pcc/mip/reader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: reader.c,v 1.10 2007/11/17 12:00:37 ragge Exp $ */ +/* $OpenBSD: reader.c,v 1.11 2007/12/09 18:40:29 ragge Exp $ */ /* * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). * All rights reserved. @@ -402,7 +402,8 @@ again: switch (o = p->n_op) { case UGT: p1 = p->n_left; p2 = p->n_right; - if (p2->n_op == ICON && p2->n_lval == 0) { + if (p2->n_op == ICON && p2->n_lval == 0 && + optype(p1->n_op) == BITYPE) { if (findops(p1, FORCC) == 0) break; } @@ -632,6 +633,10 @@ gencode(NODE *p, int cookie) int lr = rspecial(q, NLEFT); if (rr >= 0) { +#ifdef PCC_DEBUG + if (optype(p->n_op) != BITYPE) + comperr("gencode: rspecial borked"); +#endif if (r->n_op != REG) comperr("gencode: rop != REG"); if (rr != r->n_rval) |