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 resolve merge conflicts
details: https://anonhg.NetBSD.org/src/rev/ce04a7d54732
branches: trunk
changeset: 778435:ce04a7d54732
user: plunky <plunky%NetBSD.org@localhost>
date: Mon Mar 26 14:30:46 2012 +0000
description:
resolve merge conflicts
diffstat:
external/bsd/pcc/dist/pcc/cc/ccom/ccom.1 | 171 ++++++++++++++++++++++++-
external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c | 7 +-
external/bsd/pcc/dist/pcc/cc/ccom/pass1.h | 9 +-
external/bsd/pcc/dist/pcc/cc/ccom/pftn.c | 28 ++-
external/bsd/pcc/dist/pcc/mip/common.c | 10 +-
5 files changed, 199 insertions(+), 26 deletions(-)
diffs (truncated from 378 to 300 lines):
diff -r c28b1dd575f6 -r ce04a7d54732 external/bsd/pcc/dist/pcc/cc/ccom/ccom.1
--- a/external/bsd/pcc/dist/pcc/cc/ccom/ccom.1 Mon Mar 26 14:26:07 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/ccom.1 Mon Mar 26 14:30:46 2012 +0000
@@ -1,5 +1,5 @@
-.\" Id: ccom.1,v 1.24 2011/11/14 16:46:17 plunky Exp
-.\" $NetBSD: ccom.1,v 1.5 2012/01/11 20:46:48 plunky Exp $
+.\" Id: ccom.1,v 1.27 2012/03/22 21:09:41 plunky Exp
+.\" $NetBSD: ccom.1,v 1.6 2012/03/26 14:30:46 plunky Exp $
.\"
.\" Copyright (c) 2007 Jeremy C. Reed <reed%reedmedia.net@localhost>
.\"
@@ -16,7 +16,7 @@
.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
.\" THIS SOFTWARE.
.\"
-.Dd November 14, 2011
+.Dd March 22, 2012
.Dt CCOM 1
.Os
.Sh NAME
@@ -222,7 +222,7 @@
Delete redundant jumps and dead code.
.It Sy gnu89
.It Sy gnu99
-Use gcc semantics rather than C99 for some things.
+Use GNU C semantics rather than C99 for some things.
Currently only inline.
.It Sy inline
Replace calls to functions marked with an inline specifier with a copy
@@ -254,6 +254,8 @@
Trees when entering pass2
.It Sy f
Instruction matcher, may provide much output
+.It Sy g
+Print flow graphs
.It Sy n
Memory allocation
.It Sy o
@@ -270,6 +272,167 @@
Target-specific flag, used in machine-dependent code
.El
.El
+.Sh PRAGMAS
+Input lines starting with a
+.Dq #pragma
+directive can be used to modify behaviour of
+.Nm
+during compilation.
+All tokens up to the first unescaped newline are considered part
+of the pragma command, with the following operations being recognized:
+.Bl -tag
+.It Sy STDC
+Standard C99 operator follows.
+Currently no C99 operations are implemented, and any directives starting
+with this token will be silently ignored.
+.It Sy GCC diagnostic Ar effect Qq Ar option
+GNU C compatibility.
+Alter the effects of compiler diagnostics.
+The required
+.Ar effect
+should be stated as
+.Sy warning ,
+.Sy error
+or
+.Sy ignored ,
+followed by the compiler diagnostic
+.Ar option
+in double quotes.
+For example, to force unknown pragmas to always generate an error,
+a standard header might include
+.Bd -literal -offset 2n
+#pragma GCC diagnostic error "-Wunknown-pragmas"
+.Ed
+.It Sy GCC poison Ar identifier ...
+GNU C compatibility.
+Cause an error if any of the following
+.Ar identifier Ns s
+subsequently appear in the code
+.Pq but not in any macro expansions .
+Currently not implemented.
+.It Sy GCC visibility
+GNU C compatibility.
+Currently not implemented.
+.It Sy pack Ns Pq Op Ar n
+Set the default maximum alignment for structures and unions, such that
+members will have their natural alignment requirements clamped at this
+value and may be stored misaligned.
+If
+.Ar n
+is not given, the alignment is reset to the target default.
+.It Sy pack Ns Pq Sy push Ns Op , Ar n
+Push the current pack setting onto an internal stack then, if
+.Ar n
+is given, change the default alignment for structures and unions.
+Currently not implemented.
+.It Sy pack Ns Pq Sy pop
+Change the pack setting to the most recently pushed value, and remove
+that setting from the stack.
+Currently not implemented.
+.It Sy packed Op Ar n
+Set the maximum alignment for the structure or union defined
+in the current statement.
+If
+.Ar n
+is not given, the default value of 1 is used.
+.Pq Currently this works except Ar n is not used
+.It Sy aligned Op Ar n
+Set the minimum alignment for the structure or union defined
+in the current statement.
+.It Sy rename Ar name
+Provide an alternative
+.Ar name
+which will be used to reference the object declared in the current statement.
+.It Sy weak Ar name Ns Op = Ns Ar alias
+Mark
+.Ar name
+as a weak rather than a global symbol, to allow its definition to be
+overridden at link time.
+If an
+.Ar alias
+is given, this will be used as the default value of
+.Ar name.
+.It Sy ident
+Currently not implemented.
+.El
+.Lp
+and the following target-specific operations are handled by
+machine-dependent code:
+.Bl -tag
+.It Sy tls
+For AMD64 and i386 targets, the variable declared in the current statement
+will be referenced via the
+.Dq thread-local storage
+mechanism.
+.It Sy init
+For AMD64, ARM, HPPA, i386, MIPS and PowerPC targets, when the current statement is a
+function declaration, generate a reference in the
+.Sy .ctors
+section, enabling library code to call the function prior to entering
+.Fn main .
+.It Sy fini
+For AMD64, ARM, HPPA, i386, MIPS and PowerPC targets, when the current statement is a
+function declaration, generate a reference in the
+.Sy .dtors
+section, enabling library code to call the function when
+.Fn main
+returns or the
+.Fn exit
+function is called.
+.It Sy section Ar name
+For AMD64, ARM, HPPA and i386 targets, place the subsequent code in the named
+section.
+.Pq This is currently broken .
+.It Sy alias Ar name
+For AMD64, HPPA and i386 targets, emit assembler instructions providing an
+alias for the symbol defined by the current statement.
+.It Sy stdcall
+For i386 targets, enable
+.Dq stdcall
+semantics during code generation, where function arguments are passed on
+the stack in right-to-left order, and the callee is responsible for adjusting
+the stack pointer before returning.
+Any function result is passed in the EAX register.
+On win32, the function name is postfixed with an
+.Dq @
+and the size of the stack adjustment.
+.It Sy cdecl
+For i386 targets, enable
+.Dq cdecl
+semantics during code generation, where function arguments are passed on
+the stack in right-to-left order, and the caller is responsible for cleaning
+up the stack after the function returns.
+Any function result is passed in the EAX register.
+This is the default.
+.It Sy fastcall
+For i386-win32 targets, enable
+.Dq fastcall
+semantics during code generation.
+.Po
+Currently this is equivalent to
+.Sy stdcall ,
+which is likely wrong
+.Pc .
+.It Sy dllimport
+For i386-win32 targets, references to the external symbol defined by
+the current statement will be made via indirect access through a
+location identified by the symbol name prefixed with
+.Dq __imp_ .
+.It Sy dllexport
+For i386-win32 targets, the external symbol declared by the current
+statement will be exported as an indirect reference to be
+accessed with
+.Sy dllimport .
+The global locator will be the symbol name prefixed with
+.Dq __imp_ .
+Currently this is not completely implemented.
+.El
+.Pp
+Any unknown
+.Dq #pragma
+directives will be ignored unless the
+.Fl Wunknown-pragmas
+diagnostic is in effect.
.Sh SEE ALSO
.Xr as 1 ,
.Xr cpp 1 ,
diff -r c28b1dd575f6 -r ce04a7d54732 external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c
--- a/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c Mon Mar 26 14:26:07 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c Mon Mar 26 14:30:46 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: gcc_compat.c,v 1.81 2011/07/27 13:41:44 ragge Exp */
-/* $NetBSD: gcc_compat.c,v 1.2 2012/03/12 09:09:40 plunky Exp $ */
+/* Id: gcc_compat.c,v 1.83 2012/03/22 18:04:41 plunky Exp */
+/* $NetBSD: gcc_compat.c,v 1.3 2012/03/26 14:30:46 plunky Exp $ */
/*
* Copyright (c) 2004 Anders Magnusson (ragge%ludd.luth.se@localhost).
* All rights reserved.
@@ -514,7 +514,8 @@
int
pragmas_gcc(char *t)
{
- int ign, warn, err, i, u;
+ char u;
+ int ign, warn, err, i;
extern bittype warnary[], werrary[];
extern char *flagstr[], *pragstore;
diff -r c28b1dd575f6 -r ce04a7d54732 external/bsd/pcc/dist/pcc/cc/ccom/pass1.h
--- a/external/bsd/pcc/dist/pcc/cc/ccom/pass1.h Mon Mar 26 14:26:07 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/pass1.h Mon Mar 26 14:30:46 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: pass1.h,v 1.235 2011/08/14 14:52:29 ragge Exp */
-/* $NetBSD: pass1.h,v 1.2 2012/03/12 09:09:40 plunky Exp $ */
+/* Id: pass1.h,v 1.237 2012/03/22 18:51:40 plunky Exp */
+/* $NetBSD: pass1.h,v 1.3 2012/03/26 14:30:46 plunky Exp $ */
/*
* Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
*
@@ -169,7 +169,6 @@
extern int blevel;
extern int instruct, got_type;
extern int oldstyle;
-extern int oflag;
extern int lineno, nerrors;
@@ -183,8 +182,8 @@
extern int reached;
extern int isinlining;
extern int xinline, xgnu89, xgnu99;
-
-extern int sdebug, idebug, pdebug;
+extern int bdebug, ddebug, edebug, idebug, ndebug;
+extern int odebug, pdebug, sdebug, tdebug, xdebug;
/* various labels */
extern int brklab;
diff -r c28b1dd575f6 -r ce04a7d54732 external/bsd/pcc/dist/pcc/cc/ccom/pftn.c
--- a/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c Mon Mar 26 14:26:07 2012 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c Mon Mar 26 14:30:46 2012 +0000
@@ -1,5 +1,5 @@
-/* Id: pftn.c,v 1.339 2011/08/31 18:02:24 plunky Exp */
-/* $NetBSD: pftn.c,v 1.7 2011/09/01 12:55:29 plunky Exp $ */
+/* Id: pftn.c,v 1.342 2012/03/22 18:51:40 plunky Exp */
+/* $NetBSD: pftn.c,v 1.8 2012/03/26 14:30:46 plunky Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
* All rights reserved.
@@ -131,8 +131,6 @@
static NODE *mkcmplx(NODE *p, TWORD dt);
extern int fun_inline;
-int ddebug = 0;
-
/*
* Declaration of an identifier. Handles redeclarations, hiding,
* incomplete types and forward declarations.
@@ -1992,6 +1990,10 @@
if (w->n_right->n_op == ELLIPSIS)
continue;
ty = w->n_right->n_type;
+ if (ty == ENUMTY) {
+ uerror("arg %d enum undeclared", cnt);
+ ty = w->n_right->n_type = INT;
+ }
if (BTYPE(ty) == STRTY || BTYPE(ty) == UNIONTY)
num++;
while (ISFTN(ty) == 0 && ISARY(ty) == 0 && ty > BTMASK)
@@ -2001,6 +2003,10 @@
}
cnt++;
ty = w->n_type;
+ if (ty == ENUMTY) {
+ uerror("arg %d enum undeclared", cnt);
+ ty = w->n_type = INT;
+ }
if (BTYPE(ty) == STRTY || BTYPE(ty) == UNIONTY)
num++;
while (ISFTN(ty) == 0 && ISARY(ty) == 0 && ty > BTMASK)
@@ -2168,7 +2174,10 @@
Home |
Main Index |
Thread Index |
Old Index