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-20120105



details:   https://anonhg.NetBSD.org/src/rev/df620b6591cc
branches:  trunk
changeset: 772683:df620b6591cc
user:      plunky <plunky%NetBSD.org@localhost>
date:      Wed Jan 11 20:32:32 2012 +0000

description:
Update to pcc-20120105

The full changelog is at

 http://pcc.ludd.ltu.se/fisheye/changelog/~date=2012-01-05T06%3A00%3A00/pcc

notable improvements since 2011-09-01

- the previous version failed to compile an i386 kernel, this works
  (and the kernel boots though I would consider it experimental)
- MacOS X fixes
- misc documentation improvements
- improved regression tests
- some work has been done towards supporting C++

diffstat:

 external/bsd/pcc/dist/pcc/DATESTAMP                    |     2 +-
 external/bsd/pcc/dist/pcc/arch/amd64/code.c            |     6 +-
 external/bsd/pcc/dist/pcc/arch/amd64/local2.c          |    10 +-
 external/bsd/pcc/dist/pcc/arch/amd64/table.c           |     6 +-
 external/bsd/pcc/dist/pcc/arch/arm/code.c              |   527 +-
 external/bsd/pcc/dist/pcc/arch/arm/local.c             |    61 +-
 external/bsd/pcc/dist/pcc/arch/arm/table.c             |     6 +-
 external/bsd/pcc/dist/pcc/arch/hppa/local.c            |     6 +-
 external/bsd/pcc/dist/pcc/arch/i386/local.c            |    29 +-
 external/bsd/pcc/dist/pcc/arch/i386/local2.c           |    17 +-
 external/bsd/pcc/dist/pcc/arch/m16c/local.c            |     8 +-
 external/bsd/pcc/dist/pcc/cc/cc/cc.c                   |   102 +-
 external/bsd/pcc/dist/pcc/cc/ccom/builtins.c           |    15 +-
 external/bsd/pcc/dist/pcc/cc/ccom/cgram.y              |     8 +-
 external/bsd/pcc/dist/pcc/cc/ccom/init.c               |     6 +-
 external/bsd/pcc/dist/pcc/cc/cpp/cpp.c                 |     8 +-
 external/bsd/pcc/dist/pcc/cc/cpp/cpp.h                 |     8 +-
 external/bsd/pcc/dist/pcc/cc/cxxcom/Makefile.in        |   189 +
 external/bsd/pcc/dist/pcc/cc/cxxcom/builtins.c         |   821 +++
 external/bsd/pcc/dist/pcc/cc/cxxcom/cgram.y            |  2525 +++++++++++
 external/bsd/pcc/dist/pcc/cc/cxxcom/cxxcode.c          |   823 +++
 external/bsd/pcc/dist/pcc/cc/cxxcom/cxxdefs.h          |    46 +
 external/bsd/pcc/dist/pcc/cc/cxxcom/gcc_compat.c       |   584 ++
 external/bsd/pcc/dist/pcc/cc/cxxcom/init.c             |  1228 +++++
 external/bsd/pcc/dist/pcc/cc/cxxcom/inline.c           |   569 ++
 external/bsd/pcc/dist/pcc/cc/cxxcom/main.c             |   371 +
 external/bsd/pcc/dist/pcc/cc/cxxcom/optim.c            |   426 ++
 external/bsd/pcc/dist/pcc/cc/cxxcom/pass1.h            |   648 +++
 external/bsd/pcc/dist/pcc/cc/cxxcom/pftn.c             |  3379 ++++++++++++++++
 external/bsd/pcc/dist/pcc/cc/cxxcom/scan.l             |   830 +++
 external/bsd/pcc/dist/pcc/cc/cxxcom/softfloat.c        |   360 +
 external/bsd/pcc/dist/pcc/cc/cxxcom/stabs.c            |   460 ++
 external/bsd/pcc/dist/pcc/cc/cxxcom/symtabs.c          |   455 ++
 external/bsd/pcc/dist/pcc/cc/cxxcom/trees.c            |  3304 +++++++++++++++
 external/bsd/pcc/dist/pcc/configure                    |     4 +-
 external/bsd/pcc/dist/pcc/f77/fcom/defs.h              |     9 +-
 external/bsd/pcc/dist/pcc/mip/compat.c                 |     8 +-
 external/bsd/pcc/dist/pcc/mip/reader.c                 |     9 +-
 external/bsd/pcc/dist/pcc/os/win32/build_installer.bat |     2 +-
 external/bsd/pcc/dist/pcc/os/win32/ccconfig.h          |     6 +-
 40 files changed, 17469 insertions(+), 412 deletions(-)

diffs (truncated from 18932 to 300 lines):

diff -r 0127d371b4d2 -r df620b6591cc external/bsd/pcc/dist/pcc/DATESTAMP
--- a/external/bsd/pcc/dist/pcc/DATESTAMP       Wed Jan 11 19:44:56 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/DATESTAMP       Wed Jan 11 20:32:32 2012 +0000
@@ -1,1 +1,1 @@
-20110901
+20120105
diff -r 0127d371b4d2 -r df620b6591cc external/bsd/pcc/dist/pcc/arch/amd64/code.c
--- a/external/bsd/pcc/dist/pcc/arch/amd64/code.c       Wed Jan 11 19:44:56 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/arch/amd64/code.c       Wed Jan 11 20:32:32 2012 +0000
@@ -1,5 +1,5 @@
-/*     Id: code.c,v 1.62 2011/08/20 12:54:27 ragge Exp         */      
-/*     $NetBSD: code.c,v 1.1.1.3 2011/09/01 12:46:27 plunky Exp $      */
+/*     Id: code.c,v 1.63 2011/09/27 08:10:45 plunky Exp        */      
+/*     $NetBSD: code.c,v 1.1.1.4 2012/01/11 20:32:40 plunky Exp $      */
 /*
  * Copyright (c) 2008 Michael Shalayeff
  * Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
@@ -355,7 +355,7 @@
        if (flag)
                return;
 
-#ifdef MACHOAPI
+#ifdef MACHOABI
 #define PT(x)
 #else
 #define        PT(x) printf(".type __pcc_" x ",@function\n")
diff -r 0127d371b4d2 -r df620b6591cc external/bsd/pcc/dist/pcc/arch/amd64/local2.c
--- a/external/bsd/pcc/dist/pcc/arch/amd64/local2.c     Wed Jan 11 19:44:56 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/arch/amd64/local2.c     Wed Jan 11 20:32:32 2012 +0000
@@ -1,5 +1,5 @@
-/*     Id: local2.c,v 1.48 2011/08/21 09:36:22 ragge Exp       */      
-/*     $NetBSD: local2.c,v 1.1.1.3 2011/09/01 12:46:28 plunky Exp $    */
+/*     Id: local2.c,v 1.49 2011/09/21 21:23:09 plunky Exp      */      
+/*     $NetBSD: local2.c,v 1.1.1.4 2012/01/11 20:32:40 plunky Exp $    */
 /*
  * Copyright (c) 2008 Michael Shalayeff
  * Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
@@ -264,9 +264,9 @@
        if (p->n_left->n_op != REG)
                comperr("bad compare %p\n", p);
        if ((p->n_su & DORIGHT) == 0)
-               expand(p, 0, "  fxch\n");
-       expand(p, 0, "  fucomip %st(1),%st\n"); /* emit compare insn  */
-       expand(p, 0, "  fstp %st(0)\n");        /* pop fromstack */
+               expand(p, 0, "\tfxch\n");
+       expand(p, 0, "\tfucomip %st(1),%st\n"); /* emit compare insn  */
+       expand(p, 0, "\tfstp %st(0)\n");        /* pop fromstack */
        zzzcode(p, 'U');
 }
 
diff -r 0127d371b4d2 -r df620b6591cc external/bsd/pcc/dist/pcc/arch/amd64/table.c
--- a/external/bsd/pcc/dist/pcc/arch/amd64/table.c      Wed Jan 11 19:44:56 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/arch/amd64/table.c      Wed Jan 11 20:32:32 2012 +0000
@@ -1,5 +1,5 @@
-/*     Id: table.c,v 1.49 2011/08/21 09:32:46 ragge Exp        */      
-/*     $NetBSD: table.c,v 1.1.1.3 2011/09/01 12:46:29 plunky Exp $     */
+/*     Id: table.c,v 1.50 2011/12/13 17:46:18 ragge Exp        */      
+/*     $NetBSD: table.c,v 1.1.1.4 2012/01/11 20:32:42 plunky Exp $     */
 /*
  * Copyright (c) 2008 Michael Shalayeff
  * Copyright (c) 2008 Anders Magnusson (ragge%ludd.ltu.se@localhost).
@@ -56,7 +56,7 @@
                "", },
 
 { PCONV,       INAREG,
-       SAREG|SOREG|SNAME,      TUWORD,
+       SAREG|SOREG|SNAME,      TWORD,
        SAREG,  TPOINT,
                NASL|NAREG,     RESC1,
                "       movl AL,Z1\n", },/* amd64 zero-extends 32-bit movl */
diff -r 0127d371b4d2 -r df620b6591cc external/bsd/pcc/dist/pcc/arch/arm/code.c
--- a/external/bsd/pcc/dist/pcc/arch/arm/code.c Wed Jan 11 19:44:56 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/arch/arm/code.c Wed Jan 11 20:32:32 2012 +0000
@@ -1,5 +1,5 @@
-/*      Id: code.c,v 1.25 2011/06/04 07:41:11 ragge Exp     */ 
-/*      $NetBSD: code.c,v 1.1.1.4 2011/09/01 12:46:30 plunky Exp $    */
+/*      Id: code.c,v 1.26 2011/11/13 22:30:18 gmcgarry Exp     */      
+/*      $NetBSD: code.c,v 1.1.1.5 2012/01/11 20:32:43 plunky Exp $    */
 /*
  * Copyright (c) 2007 Gregory McGarry (g.mcgarry%ieee.org@localhost).
  * Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
@@ -37,39 +37,44 @@
 #include "pass1.h"
 #include "pass2.h"
 
-int lastloc = -1;
 static int rvnr;
 
 /*
+ * Print out assembler segment name.
+ */
+void
+setseg(int seg, char *name)
+{
+       switch (seg) {
+       case PROG: name = ".text"; break;
+       case DATA:
+       case LDATA: name = ".data"; break;
+       case UDATA: break;
+       case PICLDATA: name = ".section .data.rel.local,\"aw\",@progbits";break;
+       case PICDATA: name = ".section .data.rel.rw,\"aw\",@progbits"; break;
+       case PICRDATA: name = ".section .data.rel.ro,\"aw\",@progbits"; break;
+       case STRNG:
+       case RDATA: name = ".section .rodata"; break;
+       case TLSDATA: name = ".section .tdata,\"awT\",@progbits"; break;
+       case TLSUDATA: name = ".section .tbss,\"awT\",@nobits"; break;
+       case CTORS: name = ".section\t.ctors,\"aw\",@progbits"; break;
+       case DTORS: name = ".section\t.dtors,\"aw\",@progbits"; break;
+       case NMSEG: 
+               printf("\t.section %s,\"aw\",@progbits\n", name);
+               return;
+       }
+       printf("\t%s\n", name);
+}
+
+/*
  * Define everything needed to print out some data (or text).
  * This means segment, alignment, visibility, etc.
  */
 void
 defloc(struct symtab *sp)
 {
-       extern char *nextsect;
-       static char *loctbl[] = { "text", "data", "section .rodata" };
        char *n;
-       TWORD t;
-       int s;
 
-       if (sp == NULL) {
-               lastloc = -1;
-               return;
-       }
-       t = sp->stype;
-       s = ISFTN(t) ? PROG : ISCON(cqual(t, sp->squal)) ? PROG : DATA;
-       if (nextsect) {
-               printf("\t.section %s\n", nextsect);
-               nextsect = NULL;
-               s = -1;
-       } else if (s != lastloc)
-               printf("\t.%s\n", loctbl[s]);
-       lastloc = s;
-       while (ISARY(t))
-               t = DECREF(t);
-       if (t > UCHAR)
-               printf("\t.align %d\n", t > USHORT ? 4 : 2);
        n = sp->soname ? sp->soname : exname(sp->sname);
 #ifdef USE_GAS
        if (ISFTN(t))
@@ -77,8 +82,6 @@
 #endif
        if (sp->sclass == EXTDEF)
                printf("\t.global %s\n", n);
-       if (ISFTN(t))
-               return;
        if (sp->slevel == 0)
                printf("%s:\n", n);
        else
@@ -91,13 +94,13 @@
 static void
 putintemp(struct symtab *sym)
 {
-        NODE *p;
+       NODE *p;
 
-        p = tempnode(0, sym->stype, sym->sdf, sym->ssue);
-        p = buildtree(ASSIGN, p, nametree(sym));
-        sym->soffset = regno(p->n_left);
-        sym->sflags |= STNODE;
-        ecomp(p);
+       p = tempnode(0, sym->stype, sym->sdf, sym->sap);
+       p = buildtree(ASSIGN, p, nametree(sym));
+       sym->soffset = regno(p->n_left);
+       sym->sflags |= STNODE;
+       ecomp(p);
 }
 
 /* setup a 64-bit parameter (double/ldouble/longlong)
@@ -105,9 +108,9 @@
 static void
 param_64bit(struct symtab *sym, int *argofsp, int dotemps)
 {
-        int argofs = *argofsp;
-        NODE *p, *q;
-        int navail;
+       int argofs = *argofsp;
+       NODE *p, *q;
+       int navail;
 
 #if ALLONGLONG == 64
        /* alignment */
@@ -116,54 +119,54 @@
        *argofsp = argofs;
 #endif
 
-        navail = NARGREGS - argofs;
+       navail = NARGREGS - argofs;
 
-        if (navail < 2) {
+       if (navail < 2) {
                /* half in and half out of the registers */
                if (features(FEATURE_BIGENDIAN)) {
                        cerror("param_64bit");
                        p = q = NULL;
                } else {
-                       q = block(REG, NIL, NIL, INT, 0, );
-                       regno(q) = R0 + argofs;
+                       q = block(REG, NIL, NIL, INT, 0, 0);
+                       regno(q) = R0 + argofs;
                        if (dotemps) {
                                q = block(SCONV, q, NIL,
                                    ULONGLONG, 0, 0);
-                               p = nametree(sym);
+                               p = nametree(sym);
                                p->n_type = ULONGLONG;
                                p->n_df = 0;
-                               p->n_sue = NULL;
+                               p->n_ap = NULL;
                                p = block(LS, p, bcon(32), ULONGLONG, 0, 0);
                                q = block(PLUS, p, q, ULONGLONG, 0, 0);
                                p = tempnode(0, ULONGLONG, 0, 0);
                                sym->soffset = regno(p);
                                sym->sflags |= STNODE;
                        } else {
-                               p = nametree(sym);
+                               p = nametree(sym);
                                regno(p) = sym->soffset;
                                p->n_type = INT;
                                p->n_df = 0;
-                               p->n_sue = NULL;
+                               p->n_ap = NULL;
                        }
                }
-               p = buildtree(ASSIGN, p, q);
+               p = buildtree(ASSIGN, p, q);
                ecomp(p);
-               *argofsp = argofs + 2;
+               *argofsp = argofs + 2;
                return;
-        }
+       }
 
-        q = block(REG, NIL, NIL, sym->stype, sym->sdf, sym->ssue);
-        regno(q) = R0R1 + argofs;
-        if (dotemps) {
-                p = tempnode(0, sym->stype, sym->sdf, sym->ssue);
-                sym->soffset = regno(p);
-                sym->sflags |= STNODE;
-        } else {
-                p = nametree(sym);
-        }
-        p = buildtree(ASSIGN, p, q);
-        ecomp(p);
-        *argofsp = argofs + 2;
+       q = block(REG, NIL, NIL, sym->stype, sym->sdf, sym->sap);
+       regno(q) = R0R1 + argofs;
+       if (dotemps) {
+               p = tempnode(0, sym->stype, sym->sdf, sym->sap);
+               sym->soffset = regno(p);
+               sym->sflags |= STNODE;
+       } else {
+               p = nametree(sym);
+       }
+       p = buildtree(ASSIGN, p, q);
+       ecomp(p);
+       *argofsp = argofs + 2;
 }
 
 /* setup a 32-bit param on the stack
@@ -171,19 +174,19 @@
 static void
 param_32bit(struct symtab *sym, int *argofsp, int dotemps)
 {
-        NODE *p, *q;
+       NODE *p, *q;
 
-        q = block(REG, NIL, NIL, sym->stype, sym->sdf, sym->ssue);
-        regno(q) = R0 + (*argofsp)++;
-        if (dotemps) {
-                p = tempnode(0, sym->stype, sym->sdf, sym->ssue);
-                sym->soffset = regno(p);
-                sym->sflags |= STNODE;
-        } else {
-                p = nametree(sym);
-        }
-        p = buildtree(ASSIGN, p, q);
-        ecomp(p);
+       q = block(REG, NIL, NIL, sym->stype, sym->sdf, sym->sap);
+       regno(q) = R0 + (*argofsp)++;
+       if (dotemps) {
+               p = tempnode(0, sym->stype, sym->sdf, sym->sap);
+               sym->soffset = regno(p);
+               sym->sflags |= STNODE;
+       } else {
+               p = nametree(sym);
+       }
+       p = buildtree(ASSIGN, p, q);
+       ecomp(p);
 }
 
 /* setup a double param on the stack



Home | Main Index | Thread Index | Old Index