Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/pcc/dist/pcc Update to pcc-20120325
details: https://anonhg.NetBSD.org/src/rev/c28b1dd575f6
branches: trunk
changeset: 778434:c28b1dd575f6
user: plunky <plunky%NetBSD.org@localhost>
date: Mon Mar 26 14:26:07 2012 +0000
description:
Update to pcc-20120325
The full changelog is at
http://pcc.ludd.ltu.se/fisheye/changelog/~date=2012-03-25T06%3A00%3A00/pcc
and includes some bug and documentation fixes.
The siginifcant improvements were that the __returns_twice__ attribute is
now accepted, and a problem parsing attributes on parameters of function
prototypes was fixed.
(both of these issues caused problems compiling with the NetBSD headers)
diffstat:
external/bsd/pcc/dist/pcc/DATESTAMP | 2 +-
external/bsd/pcc/dist/pcc/arch/amd64/local.c | 17 ++-
external/bsd/pcc/dist/pcc/arch/i386/local2.c | 7 +-
external/bsd/pcc/dist/pcc/arch/vax/local2.c | 13 +-
external/bsd/pcc/dist/pcc/cc/cc/Makefile.in | 7 +-
external/bsd/pcc/dist/pcc/cc/ccom/Makefile.in | 7 +-
external/bsd/pcc/dist/pcc/cc/ccom/builtins.c | 6 +-
external/bsd/pcc/dist/pcc/cc/ccom/cgram.y | 23 ++-
external/bsd/pcc/dist/pcc/cc/ccom/init.c | 6 +-
external/bsd/pcc/dist/pcc/cc/ccom/inline.c | 6 +-
external/bsd/pcc/dist/pcc/cc/ccom/main.c | 147 ++++++++++------------
external/bsd/pcc/dist/pcc/cc/ccom/optim.c | 10 +-
external/bsd/pcc/dist/pcc/cc/ccom/stabs.c | 31 ++--
external/bsd/pcc/dist/pcc/cc/ccom/trees.c | 10 +-
external/bsd/pcc/dist/pcc/cc/cpp/Makefile.in | 7 +-
external/bsd/pcc/dist/pcc/cc/cxxcom/Makefile.in | 7 +-
external/bsd/pcc/dist/pcc/cc/cxxcom/builtins.c | 6 +-
external/bsd/pcc/dist/pcc/cc/cxxcom/gcc_compat.c | 7 +-
external/bsd/pcc/dist/pcc/cc/cxxcom/init.c | 6 +-
external/bsd/pcc/dist/pcc/cc/cxxcom/inline.c | 6 +-
external/bsd/pcc/dist/pcc/cc/cxxcom/main.c | 146 ++++++++++------------
external/bsd/pcc/dist/pcc/cc/cxxcom/optim.c | 10 +-
external/bsd/pcc/dist/pcc/cc/cxxcom/pass1.h | 9 +-
external/bsd/pcc/dist/pcc/cc/cxxcom/pftn.c | 14 +-
external/bsd/pcc/dist/pcc/cc/cxxcom/stabs.c | 31 ++--
external/bsd/pcc/dist/pcc/cc/cxxcom/trees.c | 8 +-
external/bsd/pcc/dist/pcc/cc/driver/Makefile.in | 5 +-
external/bsd/pcc/dist/pcc/f77/f77/Makefile.in | 5 +-
external/bsd/pcc/dist/pcc/f77/fcom/Makefile.in | 5 +-
external/bsd/pcc/dist/pcc/f77/fcom/main.c | 62 +++++---
external/bsd/pcc/dist/pcc/mip/manifest.h | 9 +-
external/bsd/pcc/dist/pcc/mip/match.c | 6 +-
external/bsd/pcc/dist/pcc/mip/pass2.h | 12 +-
external/bsd/pcc/dist/pcc/mip/reader.c | 9 +-
external/bsd/pcc/dist/pcc/mip/regs.c | 57 ++++----
35 files changed, 353 insertions(+), 366 deletions(-)
diffs (truncated from 1668 to 300 lines):
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/DATESTAMP
--- a/external/bsd/pcc/dist/pcc/DATESTAMP Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/DATESTAMP Mon Mar 26 14:26:07 2012 +0000
@@ -1,1 +1,1 @@
-20120105
+20120325
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/arch/amd64/local.c
--- a/external/bsd/pcc/dist/pcc/arch/amd64/local.c Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/arch/amd64/local.c Mon Mar 26 14:26:07 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: local.c,v 1.65 2011/08/21 09:32:46 ragge Exp */
-/* $NetBSD: local.c,v 1.1.1.3 2011/09/01 12:46:27 plunky Exp $ */
+/* Id: local.c,v 1.66 2012/03/23 17:03:09 ragge Exp */
+/* $NetBSD: local.c,v 1.1.1.4 2012/03/26 14:26:17 plunky Exp $ */
/*
* Copyright (c) 2008 Michael Shalayeff
* Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
@@ -538,8 +538,17 @@
if (p->n_op != FCON)
return;
- if (FLOAT_ISZERO(p->n_dcon))
- return;
+#ifdef mach_amd64
+ {
+ /* Do not loose negative zeros */
+ long long *llp = (long long *)(&p->n_dcon);
+ short *ssp = (short *)&llp[1];
+ if (*llp == 0 && *ssp == 0)
+ return;
+ }
+#else
+#error fixme
+#endif
/* XXX should let float constants follow */
sp = IALLOC(sizeof(struct symtab));
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/arch/i386/local2.c
--- a/external/bsd/pcc/dist/pcc/arch/i386/local2.c Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/arch/i386/local2.c Mon Mar 26 14:26:07 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: local2.c,v 1.165 2011/12/06 05:58:54 gmcgarry Exp */
-/* $NetBSD: local2.c,v 1.1.1.5 2012/01/11 20:32:48 plunky Exp $ */
+/* Id: local2.c,v 1.166 2012/03/22 18:04:41 plunky Exp */
+/* $NetBSD: local2.c,v 1.1.1.6 2012/03/26 14:26:25 plunky Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
* All rights reserved.
@@ -1270,7 +1270,8 @@
TWORD t;
char *w;
int reg;
- int c, cw, v;
+ int c, cw;
+ CONSZ v;
cw = xasmcode(p->n_name);
if (cw & (XASMASG|XASMINOUT))
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/arch/vax/local2.c
--- a/external/bsd/pcc/dist/pcc/arch/vax/local2.c Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/arch/vax/local2.c Mon Mar 26 14:26:07 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: local2.c,v 1.27 2011/07/30 08:09:29 ragge Exp */
-/* $NetBSD: local2.c,v 1.1.1.4 2011/09/01 12:46:51 plunky Exp $ */
+/* Id: local2.c,v 1.28 2012/03/22 18:56:17 plunky Exp */
+/* $NetBSD: local2.c,v 1.1.1.5 2012/03/26 14:26:41 plunky Exp $ */
/*
* Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
*
@@ -506,13 +506,12 @@
case 'F': /* register type of right operand */
{
register NODE *n;
- extern int xdebug;
register int ty;
n = getlr( p, 'R' );
ty = n->n_type;
- if (xdebug) printf("->%d<-", ty);
+ if (x2debug) printf("->%d<-", ty);
if ( ty==DOUBLE) printf("d");
else if ( ty==FLOAT ) printf("f");
@@ -540,10 +539,9 @@
case 'R': /* type of right operand */
{
register NODE *n;
- extern int xdebug;
n = getlr ( p, c);
- if (xdebug) printf("->%d<-", n->n_type);
+ if (x2debug) printf("->%d<-", n->n_type);
prtype(n);
return;
@@ -794,9 +792,8 @@
int
shumul( p, shape ) register NODE *p; int shape; {
register int o;
- extern int xdebug;
- if (xdebug) {
+ if (x2debug) {
printf("\nshumul:op=%d,lop=%d,rop=%d", p->n_op, p->n_left->n_op, p->n_right->n_op);
printf(" prname=%s,plty=%d, prlval=%lld\n", p->n_right->n_name, p->n_left->n_type, p->n_right->n_lval);
}
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/cc/cc/Makefile.in
--- a/external/bsd/pcc/dist/pcc/cc/cc/Makefile.in Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/cc/Makefile.in Mon Mar 26 14:26:07 2012 +0000
@@ -1,5 +1,5 @@
-# Id: Makefile.in,v 1.28 2011/08/20 21:40:37 plunky Exp
-# $NetBSD: Makefile.in,v 1.1.1.3 2011/09/01 12:46:52 plunky Exp $
+# Id: Makefile.in,v 1.29 2012/03/15 09:22:12 plunky Exp
+# $NetBSD: Makefile.in,v 1.1.1.4 2012/03/26 14:26:42 plunky Exp $
#
# Makefile.in for the cc part of pcc.
#
@@ -35,6 +35,7 @@
LDFLAGS = @LDFLAGS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
OBJS=cc.o compat.o
DEST=@BINPREFIX@pcc$(EXEEXT)
@@ -61,7 +62,7 @@
echo strip ${DESTDIR}${bindir}/${DEST} ; \
fi
test -z "${DESTDIR}$(mandir)/man1" || mkdir -p "${DESTDIR}$(mandir)/man1"
- ${INSTALL} $(srcdir)/cc.1 ${DESTDIR}${mandir}/man1/${DEST}.1
+ ${INSTALL_DATA} $(srcdir)/cc.1 ${DESTDIR}${mandir}/man1/${DEST}.1
test -z "${DESTDIR}$(PCCINCDIR)" || mkdir -p "${DESTDIR}$(PCCINCDIR)"
test -z "${DESTDIR}$(PCCLIBDIR)" || mkdir -p "${DESTDIR}$(PCCLIBDIR)"
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/cc/ccom/Makefile.in
--- a/external/bsd/pcc/dist/pcc/cc/ccom/Makefile.in Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/Makefile.in Mon Mar 26 14:26:07 2012 +0000
@@ -1,5 +1,5 @@
-# Id: Makefile.in,v 1.41 2011/06/08 09:14:25 plunky Exp
-# $NetBSD: Makefile.in,v 1.1.1.4 2011/09/01 12:46:56 plunky Exp $
+# Id: Makefile.in,v 1.42 2012/03/15 09:22:12 plunky Exp
+# $NetBSD: Makefile.in,v 1.1.1.5 2012/03/26 14:26:46 plunky Exp $
#
# Makefile.in for ccom
#
@@ -34,6 +34,7 @@
strip = @strip@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
MDIR=$(top_srcdir)/arch/$(TARGMACH)
MIPDIR=$(top_srcdir)/mip
@@ -176,7 +177,7 @@
echo strip $(DESTDIR)$(libexecdir)/$(DEST) ; \
fi
test -z "$(DESTDIR)$(mandir)/man1" || mkdir -p "$(DESTDIR)$(mandir)/man1"
- $(INSTALL) $(srcdir)/ccom.1 $(DESTDIR)$(mandir)/man1/$(DEST).1
+ $(INSTALL_DATA) $(srcdir)/ccom.1 $(DESTDIR)$(mandir)/man1/$(DEST).1
clean:
rm -f $(DEST) $(OBJS) $(MKEXT) $(LOBJS) $(LEX_OUTPUT_ROOT).c \
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/cc/ccom/builtins.c
--- a/external/bsd/pcc/dist/pcc/cc/ccom/builtins.c Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/builtins.c Mon Mar 26 14:26:07 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: builtins.c,v 1.34 2011/10/24 08:53:18 plunky Exp */
-/* $NetBSD: builtins.c,v 1.1.1.3 2012/01/11 20:33:08 plunky Exp $ */
+/* Id: builtins.c,v 1.35 2012/03/22 18:04:41 plunky Exp */
+/* $NetBSD: builtins.c,v 1.1.1.4 2012/03/26 14:26:46 plunky Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
* All rights reserved.
@@ -306,7 +306,7 @@
static NODE *
builtin_object_size(NODE *f, NODE *a, TWORD rt)
{
- int v = icons(a->n_right);
+ CONSZ v = icons(a->n_right);
if (v < 0 || v > 3)
uerror("arg2 must be between 0 and 3");
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/cc/ccom/cgram.y
--- a/external/bsd/pcc/dist/pcc/cc/ccom/cgram.y Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/cgram.y Mon Mar 26 14:26:07 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: cgram.y,v 1.341 2011/09/03 07:43:43 ragge Exp */
-/* $NetBSD: cgram.y,v 1.1.1.5 2012/01/11 20:33:09 plunky Exp $ */
+/* Id: cgram.y,v 1.342 2012/03/24 16:53:12 ragge Exp */
+/* $NetBSD: cgram.y,v 1.1.1.6 2012/03/26 14:26:48 plunky Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
@@ -417,6 +417,7 @@
$$ = block(TYMERGE, $1, $2, INT, 0, gcc_attr_parse($3));
}
| declaration_specifiers abstract_declarator {
+ $1->n_ap = attr_add($1->n_ap, $2->n_ap);
$$ = block(TYMERGE, $1, $2, INT, 0, 0);
}
| declaration_specifiers {
@@ -451,15 +452,19 @@
| abstract_declarator '[' e ']' attr_var {
$$ = block(LB, $1, $3, INT, 0, gcc_attr_parse($5));
}
- | '(' ')' { $$ = bdty(UCALL, bdty(NAME, NULL)); }
- | '(' ib2 parameter_type_list ')' {
- $$ = bdty(CALL, bdty(NAME, NULL), $3);
+ | '(' ')' attr_var {
+ $$ = bdty(UCALL, bdty(NAME, NULL));
+ $$->n_ap = gcc_attr_parse($3);
}
- | abstract_declarator '(' ')' {
- $$ = bdty(UCALL, $1);
+ | '(' ib2 parameter_type_list ')' attr_var {
+ $$ = block(CALL, bdty(NAME, NULL), $3, INT, 0,
+ gcc_attr_parse($5));
}
- | abstract_declarator '(' ib2 parameter_type_list ')' {
- $$ = bdty(CALL, $1, $4);
+ | abstract_declarator '(' ')' attr_var {
+ $$ = block(UCALL, $1, NIL, INT, 0, gcc_attr_parse($4));
+ }
+ | abstract_declarator '(' ib2 parameter_type_list ')' attr_var {
+ $$ = block(CALL, $1, $4, INT, 0, gcc_attr_parse($6));
}
;
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/cc/ccom/init.c
--- a/external/bsd/pcc/dist/pcc/cc/ccom/init.c Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/init.c Mon Mar 26 14:26:07 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: init.c,v 1.77 2011/09/02 15:35:34 ragge Exp */
-/* $NetBSD: init.c,v 1.1.1.5 2012/01/11 20:33:10 plunky Exp $ */
+/* Id: init.c,v 1.78 2012/03/22 18:51:40 plunky Exp */
+/* $NetBSD: init.c,v 1.1.1.6 2012/03/26 14:26:48 plunky Exp $ */
/*
* Copyright (c) 2004, 2007 Anders Magnusson (ragge%ludd.ltu.se@localhost).
@@ -112,8 +112,6 @@
* - Alignment of structs on like i386 char members.
*/
-int idebug;
-
/*
* Struct used in array initialisation.
*/
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/cc/ccom/inline.c
--- a/external/bsd/pcc/dist/pcc/cc/ccom/inline.c Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/inline.c Mon Mar 26 14:26:07 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: inline.c,v 1.46 2011/08/14 14:55:54 ragge Exp */
-/* $NetBSD: inline.c,v 1.1.1.4 2011/09/01 12:46:59 plunky Exp $ */
+/* Id: inline.c,v 1.47 2012/03/22 18:51:40 plunky Exp */
+/* $NetBSD: inline.c,v 1.1.1.5 2012/03/26 14:26:49 plunky Exp $ */
/*
* Copyright (c) 2003, 2008 Anders Magnusson (ragge%ludd.luth.se@localhost).
* All rights reserved.
@@ -88,7 +88,7 @@
SLIST_FIRST(&ipole)->flags &= ~CANINL; /* no stack refs */
if (p->n_op == NAME || p->n_op == ICON)
p->n_sp = NULL; /* let symtabs be freed for inline funcs */
- if (nflag)
+ if (ndebug)
printf("locking node %p\n", p);
}
diff -r 428a0349d911 -r c28b1dd575f6 external/bsd/pcc/dist/pcc/cc/ccom/main.c
--- a/external/bsd/pcc/dist/pcc/cc/ccom/main.c Mon Mar 26 11:03:43 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/main.c Mon Mar 26 14:26:07 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: main.c,v 1.115 2011/08/31 18:02:24 plunky Exp */
-/* $NetBSD: main.c,v 1.1.1.4 2011/09/01 12:46:59 plunky Exp $ */
+/* Id: main.c,v 1.118 2012/03/22 18:51:40 plunky Exp */
+/* $NetBSD: main.c,v 1.1.1.5 2012/03/26 14:26:49 plunky Exp $ */
/*
* Copyright (c) 2002 Anders Magnusson. All rights reserved.
@@ -39,17 +39,16 @@
#include "pass1.h"
#include "pass2.h"
-int sflag, nflag, oflag, kflag, pflag;
-int odebug, rdebug, s2debug, udebug, x2debug;
-#if !defined(MULTIPASS) || defined(PASST)
-int iTflag, oTflag;
-#endif
-int xdebug, sdebug, gflag, c2debug, pdebug, g2debug;
+int bdebug, ddebug, edebug, idebug, ndebug;
+int odebug, pdebug, sdebug, tdebug, xdebug;
+int b2debug, c2debug, e2debug, f2debug, g2debug, o2debug;
+int r2debug, s2debug, t2debug, u2debug, x2debug;
+int gflag, kflag;
+int pflag, sflag;
int sspflag;
int xssa, xtailcall, xtemps, xdeljumps, xdce, xinline, xccp, xgnu89, xgnu99;
int xuchar;
int freestanding;
Home |
Main Index |
Thread Index |
Old Index