diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-09-16 18:52:53 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-09-16 18:52:53 +0000 |
commit | a586ad04d0d33919f7cb1de64baf8a1b7eefbe39 (patch) | |
tree | 6af9ebdf525ce7b870bae53abc0953ad4f3ac4a2 /usr.bin/pcc/mip | |
parent | c0dd75448fcd63a05c6283b7faf6957a853eedb4 (diff) |
sync to ragge's tree to fix #include<file.h> and a declaration parsing
error.
Diffstat (limited to 'usr.bin/pcc/mip')
-rw-r--r-- | usr.bin/pcc/mip/common.c | 4 | ||||
-rw-r--r-- | usr.bin/pcc/mip/regs.c | 20 |
2 files changed, 15 insertions, 9 deletions
diff --git a/usr.bin/pcc/mip/common.c b/usr.bin/pcc/mip/common.c index 8b2c88f0fe8..d66d963ac73 100644 --- a/usr.bin/pcc/mip/common.c +++ b/usr.bin/pcc/mip/common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: common.c,v 1.2 2007/09/15 22:04:39 ray Exp $ */ +/* $OpenBSD: common.c,v 1.3 2007/09/16 18:52:52 otto Exp $ */ /* * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). * All rights reserved. @@ -461,7 +461,7 @@ struct b { }; #define ALIGNMENT ((int)&((struct b *)0)->a2) -#define ROUNDUP(x) ((x) + (sizeof(ALIGNMENT)-1)) & ~(sizeof(ALIGNMENT)-1) +#define ROUNDUP(x) ((x) + ((ALIGNMENT)-1)) & ~((ALIGNMENT)-1) static char *allocpole; static int allocleft; diff --git a/usr.bin/pcc/mip/regs.c b/usr.bin/pcc/mip/regs.c index 06a2f7fab75..a6360af6e8b 100644 --- a/usr.bin/pcc/mip/regs.c +++ b/usr.bin/pcc/mip/regs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: regs.c,v 1.2 2007/09/15 22:04:39 ray Exp $ */ +/* $OpenBSD: regs.c,v 1.3 2007/09/16 18:52:52 otto Exp $ */ /* * Copyright (c) 2005 Anders Magnusson (ragge@ludd.luth.se). * All rights reserved. @@ -752,11 +752,15 @@ argswalk(NODE *p) static void setlive(NODE *p, int set, REGW *rv) { - if (rv != NULL) - return set ? LIVEADDR(rv) : LIVEDELR(rv); + if (rv != NULL) { + set ? LIVEADDR(rv) : LIVEDELR(rv); + return; + } - if (p->n_regw != NULL) - return set ? LIVEADDR(p->n_regw) : LIVEDELR(p->n_regw); + if (p->n_regw != NULL) { + set ? LIVEADDR(p->n_regw) : LIVEDELR(p->n_regw); + return; + } switch (optype(p->n_op)) { case LTYPE: @@ -783,8 +787,10 @@ setlive(NODE *p, int set, REGW *rv) static void addedge_r(NODE *p, REGW *w) { - if (p->n_regw != NULL) - return AddEdge(p->n_regw, w); + if (p->n_regw != NULL) { + AddEdge(p->n_regw, w); + return; + } if (optype(p->n_op) == BITYPE) addedge_r(p->n_right, w); |