summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-10-20 18:11:52 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-10-20 18:11:52 +0000
commit0e6aa33c580bdd19e4dd7b6a04c11f911d3a016f (patch)
treecfdd40b4507b161f39f58025d750619654a55b86
parentabbd5e70ae4c6f9eb797a251f4bf4c9474f05d14 (diff)
minor changes i missed on earlier merges with ragge's repo
-rw-r--r--usr.bin/pcc/mip/common.c7
-rw-r--r--usr.bin/pcc/mip/pass2.h3
-rw-r--r--usr.bin/pcc/mip/regs.c8
3 files changed, 7 insertions, 11 deletions
diff --git a/usr.bin/pcc/mip/common.c b/usr.bin/pcc/mip/common.c
index 0e5da711906..943add0865b 100644
--- a/usr.bin/pcc/mip/common.c
+++ b/usr.bin/pcc/mip/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.6 2007/09/22 14:50:44 otto Exp $ */
+/* $OpenBSD: common.c,v 1.7 2007/10/20 18:11:51 otto Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -461,7 +461,7 @@ struct b {
} a2;
};
-#define ALIGNMENT ((int)&((struct b *)0)->a2)
+#define ALIGNMENT ((long)&((struct b *)0)->a2)
#define ROUNDUP(x) (((x) + ((ALIGNMENT)-1)) & ~((ALIGNMENT)-1))
static char *allocpole;
@@ -514,11 +514,10 @@ tmpalloc(int size)
{
void *rv;
- if (size > MEMCHUNKSZ / 2) {
+ if (size > MEMCHUNKSZ/2) {
size += ROUNDUP(sizeof(char *));
if ((rv = malloc(size)) == NULL)
cerror("tmpalloc: out of memory");
- // cerror("tmpalloc %d", size);
/* link in before current chunk XXX */
*(char **)rv = *(char **)tmppole;
*(char **)tmppole = rv;
diff --git a/usr.bin/pcc/mip/pass2.h b/usr.bin/pcc/mip/pass2.h
index c8a18e0b1ec..5ddf032747a 100644
--- a/usr.bin/pcc/mip/pass2.h
+++ b/usr.bin/pcc/mip/pass2.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pass2.h,v 1.3 2007/10/01 18:51:02 otto Exp $ */
+/* $OpenBSD: pass2.h,v 1.4 2007/10/20 18:11:51 otto Exp $ */
/*
* Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
*
@@ -251,7 +251,6 @@ void comperr(char *str, ...);
void genregs(NODE *p);
void ngenregs(struct interpass *);
NODE *store(NODE *);
-void gencall(NODE *, NODE *prev);
struct interpass *ipnode(NODE *);
void deflab(int);
void rmove(int, int, TWORD);
diff --git a/usr.bin/pcc/mip/regs.c b/usr.bin/pcc/mip/regs.c
index f846ae722b4..e81177a2ee2 100644
--- a/usr.bin/pcc/mip/regs.c
+++ b/usr.bin/pcc/mip/regs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: regs.c,v 1.9 2007/10/07 19:26:27 otto Exp $ */
+/* $OpenBSD: regs.c,v 1.10 2007/10/20 18:11:51 otto Exp $ */
/*
* Copyright (c) 2005 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -30,8 +30,6 @@
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
-#include <string.h>
-
#define MAXLOOP 20 /* Max number of allocation loops XXX 3 should be enough */
@@ -296,7 +294,7 @@ nsucomp(NODE *p)
SETNUM(w);
if (w->r_class)
DLIST_INSERT_BEFORE(&initial, w, link);
- UDEBUG(("Adding short %d calss %d\n", w->nodnum, w->r_class));
+ UDEBUG(("Adding short %d class %d\n", w->nodnum, w->r_class));
w++;
ADCL(nareg, CLASSA);
ADCL(nbreg, CLASSB);
@@ -2235,7 +2233,7 @@ onlyperm: /* XXX - should not have to redo all */
case SMALL:
optimize(ipole);
if (beenhere++ == MAXLOOP)
- comperr("beenhere");
+ comperr("beenhere");
goto recalc;
}
}