summaryrefslogtreecommitdiff
path: root/usr.bin/pcc/mip
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-09-21 07:48:14 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-09-21 07:48:14 +0000
commit0f01e992d3d8a3d3204138d2f60fe570d1eb1981 (patch)
tree9ff03918bd8eb84d487f96493d1d1e0471840944 /usr.bin/pcc/mip
parent9ab2a952601c7ba37eb85fc4e8a654f90716da73 (diff)
fix indenting
Diffstat (limited to 'usr.bin/pcc/mip')
-rw-r--r--usr.bin/pcc/mip/regs.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/usr.bin/pcc/mip/regs.c b/usr.bin/pcc/mip/regs.c
index 1cc0ca56301..170d737f9cf 100644
--- a/usr.bin/pcc/mip/regs.c
+++ b/usr.bin/pcc/mip/regs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: regs.c,v 1.4 2007/09/17 09:46:45 otto Exp $ */
+/* $OpenBSD: regs.c,v 1.5 2007/09/21 07:48:13 otto Exp $ */
/*
* Copyright (c) 2005 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -2199,53 +2199,53 @@ onlyperm: /* XXX - should not have to redo all */
optimize(ipole);
if (beenhere++ == MAXLOOP)
comperr("beenhere");
- goto recalc;
- }
+ goto recalc;
}
+ }
- /* fill in regs to save */
- ipp->ipp_regs = 0;
- for (i = 0; i < NPERMREG-1; i++) {
- NODE *p;
+ /* fill in regs to save */
+ ipp->ipp_regs = 0;
+ for (i = 0; i < NPERMREG-1; i++) {
+ NODE *p;
- if (nsavregs[i]) {
- ipp->ipp_regs |= (1 << permregs[i]);
- continue; /* Spilled */
- }
- if (nblock[i+tempmin].r_color == permregs[i])
- continue; /* Coalesced */
- /*
- * If the original color of this permreg is used for
- * coloring another register, swap them to avoid
- * unneccessary moves.
- */
- for (j = i+1; j < NPERMREG-1; j++) {
- if (nblock[j+tempmin].r_color != permregs[i])
- continue;
- nblock[j+tempmin].r_color = nblock[i+tempmin].r_color;
- break;
- }
- if (j != NPERMREG-1)
+ if (nsavregs[i]) {
+ ipp->ipp_regs |= (1 << permregs[i]);
+ continue; /* Spilled */
+ }
+ if (nblock[i+tempmin].r_color == permregs[i])
+ continue; /* Coalesced */
+ /*
+ * If the original color of this permreg is used for
+ * coloring another register, swap them to avoid
+ * unneccessary moves.
+ */
+ for (j = i+1; j < NPERMREG-1; j++) {
+ if (nblock[j+tempmin].r_color != permregs[i])
continue;
-
- /* Generate reg-reg move nodes for save */
- p = mkbinode(ASSIGN,
- mklnode(REG, 0, nblock[i+tempmin].r_color, INT),
- mklnode(REG, 0, permregs[i], INT), INT);
- p->n_reg = p->n_left->n_reg = p->n_right->n_reg = -1;
- p->n_left->n_su = p->n_right->n_su = 0;
- geninsn(p, FOREFF);
- ip = ipnode(p);
- DLIST_INSERT_AFTER(ipole->qelem.q_forw, ip, qelem);
- /* XXX not int */
- p = mkbinode(ASSIGN, mklnode(REG, 0, permregs[i], INT),
- mklnode(REG, 0, nblock[i+tempmin].r_color, INT), INT);
- p->n_reg = p->n_left->n_reg = p->n_right->n_reg = -1;
- p->n_left->n_su = p->n_right->n_su = 0;
- geninsn(p, FOREFF);
- ip = ipnode(p);
- DLIST_INSERT_BEFORE(ipole->qelem.q_back, ip, qelem);
+ nblock[j+tempmin].r_color = nblock[i+tempmin].r_color;
+ break;
}
- epp->ipp_regs = ipp->ipp_regs;
- /* Done! */
+ if (j != NPERMREG-1)
+ continue;
+
+ /* Generate reg-reg move nodes for save */
+ p = mkbinode(ASSIGN,
+ mklnode(REG, 0, nblock[i+tempmin].r_color, INT),
+ mklnode(REG, 0, permregs[i], INT), INT);
+ p->n_reg = p->n_left->n_reg = p->n_right->n_reg = -1;
+ p->n_left->n_su = p->n_right->n_su = 0;
+ geninsn(p, FOREFF);
+ ip = ipnode(p);
+ DLIST_INSERT_AFTER(ipole->qelem.q_forw, ip, qelem);
+ /* XXX not int */
+ p = mkbinode(ASSIGN, mklnode(REG, 0, permregs[i], INT),
+ mklnode(REG, 0, nblock[i+tempmin].r_color, INT), INT);
+ p->n_reg = p->n_left->n_reg = p->n_right->n_reg = -1;
+ p->n_left->n_su = p->n_right->n_su = 0;
+ geninsn(p, FOREFF);
+ ip = ipnode(p);
+ DLIST_INSERT_BEFORE(ipole->qelem.q_back, ip, qelem);
+ }
+ epp->ipp_regs = ipp->ipp_regs;
+ /* Done! */
}