Compare commits

...

1 Commits

Author SHA1 Message Date
No Author
3520370f09 This commit was manufactured by cvs2svn to create tag
'first-egcs-checkin'.

From-SVN: r24354
1998-12-17 06:43:56 +00:00
142 changed files with 46440 additions and 38810 deletions

View File

@@ -1,95 +0,0 @@
define pr
set debug_rtx ($)
end
document pr
Print the full structure of the rtx that is $.
Works only when an inferior is executing.
end
define prl
set debug_rtx_list ($, debug_rtx_count)
end
document prl
Print the full structure of all rtx insns beginning at $.
Works only when an inferior is executing.
Uses variable debug_rtx_count to control number of insns printed:
debug_rtx_count > 0: print from $ on.
debug_rtx_count < 0: print a window around $.
There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print
it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42)
end
define pt
set debug_tree ($)
end
document pt
Print the full structure of the tree that is $.
Works only when an inferior is executing.
end
define ptc
output (enum tree_code) $.common.code
echo \n
end
document ptc
Print the tree-code of the tree node that is $.
end
define pdn
output $.decl.name->identifier.pointer
echo \n
end
document pdn
Print the name of the decl-node that is $.
end
define ptn
output $.type.name->decl.name->identifier.pointer
echo \n
end
document ptn
Print the name of the type-node that is $.
end
define prc
output (enum rtx_code) $.code
echo \ (
output $.mode
echo )\n
end
document prc
Print the rtx-code and machine mode of the rtx that is $.
end
define pi
print $.fld[0].rtx@7
end
document pi
Print the fields of an instruction that is $.
end
define pbs
set print_binding_stack ()
end
document pbs
In cc1plus, print the current binding stack, frame by frame, up to and
including the global binding level.
end
# Don't let abort actually run, as it will make
# stdio stop working and therefore the `pr' command below as well.
b abort
# Make gdb complain about symbol reading errors. This is so that gcc
# developers can see and fix bugs in gcc debug output.
set complaints 20

542
gcc/ABOUT-GCC-NLS Normal file
View File

@@ -0,0 +1,542 @@
Notes on GCC's Native Language Support
GCC's Native Language Support (NLS) is relatively new and
experimental, so NLS is currently disabled by default. Use
configure's --enable-nls option to enable it. Eventually, NLS will be
enabled by default, and you'll need --disable-nls to disable it. You
must enable NLS in order to make a GCC distribution.
By and large, only diagnostic messages have been internationalized.
Some work remains in other areas; for example, GCC does not yet allow
non-ASCII letters in identifiers.
Not all of GCC's diagnostic messages have been internationalized.
Programs like `enquire' and `genattr' are not internationalized, as
their users are GCC maintainers who typically need to be able to read
English anyway; internationalizing them would thus entail needless
work for the human translators. And no one has yet gotten around to
internationalizing the messages in the C++ compiler, or in the
specialized MIPS-specific programs mips-tdump and mips-tfile.
The GCC library should not contain any messages that need
internationalization, because it operates below the
internationalization library.
Currently, the only language translation supplied is en_UK (British English).
Unlike some other GNU programs, the GCC sources contain few instances
of explicit translation calls like _("string"). Instead, the
diagnostic printing routines automatically translate their arguments.
For example, GCC source code should not contain calls like `error
(_("unterminated comment"))'; it should contain calls like `error
("unterminated comment")' instead, as it is the `error' function's
responsibility to translate the message before the user sees it.
By convention, any function parameter in the GCC sources whose name
ends in `msgid' is expected to be a message requiring translation.
For example, the `error' function's first parameter is named `msgid'.
GCC's exgettext script uses this convention to determine which
function parameter strings need to be translated. The exgettext
script also assumes that any occurrence of `%eMSGID}' on a source
line, where MSGID does not contain `%' or `}', corresponds to a
message MSGID that requires translation; this is needed to identify
diagnostics in GCC spec strings.
If you enable NLS and modify source files, you'll need to use a
special version of the GNU gettext package to propagate the
modifications to the translation tables. Apply the following patch
(use `patch -p0') to GNU gettext 0.10.35, which you can retrieve from:
ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz
This patch has been submitted to the GNU gettext maintainer, so
eventually we shouldn't need this special gettext version.
This patch is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This patch is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this patch; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
1998-07-26 Paul Eggert <eggert@twinsun.com>
* po/Makefile.in.in (maintainer-clean): Remove cat-id-tbl.c and
stamp-cat-id.
1998-07-24 Paul Eggert <eggert@twinsun.com>
* po/Makefile.in.in (cat-id-tbl.o): Depend on
$(top_srcdir)/intl/libgettext.h, not ../intl/libgettext.h.
1998-07-20 Paul Eggert <eggert@twinsun.com>
* po/Makefile.in.in (.po.pox, all-yes, $(srcdir)/cat-id-tbl.c,
$(srcdir)/stamp-cat-id, update-po): Prepend `$(srcdir)/' to
files built in the source directory; this is needed for
VPATH-based make in Solaris 2.6.
1998-07-17 Paul Eggert <eggert@twinsun.com>
Add support for user-specified argument numbers for keywords.
Extract all strings from a keyword arg, not just the first one.
Handle parenthesized commas inside keyword args correctly.
Warn about nested keywords.
* doc/gettext.texi: Document --keyword=id:argnum.
* src/xgettext.c (scan_c_file):
Warn about nested keywords, e.g. _(_("xxx")).
Warn also about not-yet-implemented but allowed nesting, e.g.
dcgettext(..._("xxx")..., "yyy").
Get all strings in a keyword arg, not just the first one.
Handle parenthesized commas inside keyword args correctly.
* src/xget-lex.h (enum xgettext_token_type_ty):
Replace xgettext_token_type_keyword1 and
xgettext_token_type_keyword2 with just plain
xgettext_token_type_keyword; it now has argnum value.
Add xgettext_token_type_rp.
(struct xgettext_token_ty): Add argnum member.
line_number and file_name are now also set for
xgettext_token_type_keyword.
(xgettext_lex_keyword): Arg is const char *.
* src/xget-lex.c: Include "hash.h".
(enum token_type_ty): Add token_type_rp.
(keywords): Now a hash table.
(phase5_get): Return token_type_rp for ')'.
(xgettext_lex, xgettext_lex_keyword): Add support for keyword argnums.
(xgettext_lex): Return xgettext_token_type_rp for ')'.
Report keyword argnum, line number, and file name back to caller.
1998-07-09 Paul Eggert <eggert@twinsun.com>
* intl/Makefile.in (uninstall):
Do nothing unless $(PACKAGE) is gettext.
===================================================================
RCS file: doc/gettext.texi,v
retrieving revision 0.10.35.0
retrieving revision 0.10.35.1
diff -pu -r0.10.35.0 -r0.10.35.1
--- doc/gettext.texi 1998/05/01 05:53:32 0.10.35.0
+++ doc/gettext.texi 1998/07/18 00:25:15 0.10.35.1
@@ -1854,13 +1854,19 @@ List of directories searched for input f
Join messages with existing file.
@item -k @var{word}
-@itemx --keyword[=@var{word}]
-Additonal keyword to be looked for (without @var{word} means not to
+@itemx --keyword[=@var{keywordspec}]
+Additonal keyword to be looked for (without @var{keywordspec} means not to
use default keywords).
-The default keywords, which are always looked for if not explicitly
-disabled, are @code{gettext}, @code{dgettext}, @code{dcgettext} and
-@code{gettext_noop}.
+If @var{keywordspec} is a C identifer @var{id}, @code{xgettext} looks
+for strings in the first argument of each call to the function or macro
+@var{id}. If @var{keywordspec} is of the form
+@samp{@var{id}:@var{argnum}}, @code{xgettext} looks for strings in the
+@var{argnum}th argument of the call.
+
+The default keyword specifications, which are always looked for if not
+explicitly disabled, are @code{gettext}, @code{dgettext:2},
+@code{dcgettext:2} and @code{gettext_noop}.
@item -m [@var{string}]
@itemx --msgstr-prefix[=@var{string}]
===================================================================
RCS file: intl/Makefile.in,v
retrieving revision 0.10.35.0
retrieving revision 0.10.35.1
diff -pu -r0.10.35.0 -r0.10.35.1
--- intl/Makefile.in 1998/04/27 21:53:18 0.10.35.0
+++ intl/Makefile.in 1998/07/09 21:39:18 0.10.35.1
@@ -143,10 +143,14 @@ install-data: all
installcheck:
uninstall:
- dists="$(DISTFILES.common)"; \
- for file in $$dists; do \
- rm -f $(gettextsrcdir)/$$file; \
- done
+ if test "$(PACKAGE)" = "gettext"; then \
+ dists="$(DISTFILES.common)"; \
+ for file in $$dists; do \
+ rm -f $(gettextsrcdir)/$$file; \
+ done
+ else \
+ : ; \
+ fi
info dvi:
===================================================================
RCS file: src/xget-lex.c,v
retrieving revision 0.10.35.0
retrieving revision 0.10.35.1
diff -pu -r0.10.35.0 -r0.10.35.1
--- src/xget-lex.c 1998/07/09 22:49:48 0.10.35.0
+++ src/xget-lex.c 1998/07/18 00:25:15 0.10.35.1
@@ -33,6 +33,7 @@
#include "error.h"
#include "system.h"
#include "libgettext.h"
+#include "hash.h"
#include "str-list.h"
#include "xget-lex.h"
@@ -83,6 +84,7 @@ enum token_type_ty
token_type_eoln,
token_type_hash,
token_type_lp,
+ token_type_rp,
token_type_comma,
token_type_name,
token_type_number,
@@ -109,7 +111,7 @@ static FILE *fp;
static int trigraphs;
static int cplusplus_comments;
static string_list_ty *comment;
-static string_list_ty *keywords;
+static hash_table keywords;
static int default_keywords = 1;
/* These are for tracking whether comments count as immediately before
@@ -941,6 +943,10 @@ phase5_get (tp)
tp->type = token_type_lp;
return;
+ case ')':
+ tp->type = token_type_rp;
+ return;
+
case ',':
tp->type = token_type_comma;
return;
@@ -1179,6 +1185,7 @@ xgettext_lex (tp)
while (1)
{
token_ty token;
+ void *keyword_value;
phase8_get (&token);
switch (token.type)
@@ -1213,17 +1220,20 @@ xgettext_lex (tp)
if (default_keywords)
{
xgettext_lex_keyword ("gettext");
- xgettext_lex_keyword ("dgettext");
- xgettext_lex_keyword ("dcgettext");
+ xgettext_lex_keyword ("dgettext:2");
+ xgettext_lex_keyword ("dcgettext:2");
xgettext_lex_keyword ("gettext_noop");
default_keywords = 0;
}
- if (string_list_member (keywords, token.string))
- {
- tp->type = (strcmp (token.string, "dgettext") == 0
- || strcmp (token.string, "dcgettext") == 0)
- ? xgettext_token_type_keyword2 : xgettext_token_type_keyword1;
+ if (find_entry (&keywords, token.string, strlen (token.string),
+ &keyword_value)
+ == 0)
+ {
+ tp->type = xgettext_token_type_keyword;
+ tp->argnum = (int) keyword_value;
+ tp->line_number = token.line_number;
+ tp->file_name = logical_file_name;
}
else
tp->type = xgettext_token_type_symbol;
@@ -1236,6 +1246,12 @@ xgettext_lex (tp)
tp->type = xgettext_token_type_lp;
return;
+ case token_type_rp:
+ last_non_comment_line = newline_count;
+
+ tp->type = xgettext_token_type_rp;
+ return;
+
case token_type_comma:
last_non_comment_line = newline_count;
@@ -1263,16 +1279,32 @@ xgettext_lex (tp)
void
xgettext_lex_keyword (name)
- char *name;
+ const char *name;
{
if (name == NULL)
default_keywords = 0;
else
{
- if (keywords == NULL)
- keywords = string_list_alloc ();
+ int argnum;
+ size_t len;
+ const char *sp;
+
+ if (keywords.table == NULL)
+ init_hash (&keywords, 100);
+
+ sp = strchr (name, ':');
+ if (sp)
+ {
+ len = sp - name;
+ argnum = atoi (sp + 1);
+ }
+ else
+ {
+ len = strlen (name);
+ argnum = 1;
+ }
- string_list_append_unique (keywords, name);
+ insert_entry (&keywords, name, len, (void *) argnum);
}
}
===================================================================
RCS file: src/xget-lex.h,v
retrieving revision 0.10.35.0
retrieving revision 0.10.35.1
diff -pu -r0.10.35.0 -r0.10.35.1
--- src/xget-lex.h 1998/07/09 22:49:48 0.10.35.0
+++ src/xget-lex.h 1998/07/18 00:25:15 0.10.35.1
@@ -23,9 +23,9 @@ Foundation, Inc., 59 Temple Place - Suit
enum xgettext_token_type_ty
{
xgettext_token_type_eof,
- xgettext_token_type_keyword1,
- xgettext_token_type_keyword2,
+ xgettext_token_type_keyword,
xgettext_token_type_lp,
+ xgettext_token_type_rp,
xgettext_token_type_comma,
xgettext_token_type_string_literal,
xgettext_token_type_symbol
@@ -37,8 +37,14 @@ struct xgettext_token_ty
{
xgettext_token_type_ty type;
- /* These 3 are only set for xgettext_token_type_string_literal. */
+ /* This 1 is set only for xgettext_token_type_keyword. */
+ int argnum;
+
+ /* This 1 is set only for xgettext_token_type_string_literal. */
char *string;
+
+ /* These 2 are set only for xgettext_token_type_keyword and
+ xgettext_token_type_string_literal. */
int line_number;
char *file_name;
};
@@ -50,7 +56,7 @@ void xgettext_lex PARAMS ((xgettext_toke
const char *xgettext_lex_comment PARAMS ((size_t __n));
void xgettext_lex_comment_reset PARAMS ((void));
/* void xgettext_lex_filepos PARAMS ((char **, int *)); FIXME needed? */
-void xgettext_lex_keyword PARAMS ((char *__name));
+void xgettext_lex_keyword PARAMS ((const char *__name));
void xgettext_lex_cplusplus PARAMS ((void));
void xgettext_lex_trigraphs PARAMS ((void));
===================================================================
RCS file: src/xgettext.c,v
retrieving revision 0.10.35.0
retrieving revision 0.10.35.1
diff -pu -r0.10.35.0 -r0.10.35.1
--- src/xgettext.c 1998/07/09 22:49:48 0.10.35.0
+++ src/xgettext.c 1998/07/18 00:25:15 0.10.35.1
@@ -835,6 +835,8 @@ scan_c_file(filename, mlp, is_cpp_file)
int is_cpp_file;
{
int state;
+ int commas_to_skip; /* defined only when in states 1 and 2 */
+ int paren_nesting; /* defined only when in state 2 */
/* Inform scanner whether we have C++ files or not. */
if (is_cpp_file)
@@ -854,63 +856,79 @@ scan_c_file(filename, mlp, is_cpp_file)
{
xgettext_token_ty token;
- /* A simple state machine is used to do the recognising:
+ /* A state machine is used to do the recognising:
State 0 = waiting for something to happen
- State 1 = seen one of our keywords with string in first parameter
- State 2 = was in state 1 and now saw a left paren
- State 3 = seen one of our keywords with string in second parameter
- State 4 = was in state 3 and now saw a left paren
- State 5 = waiting for comma after being in state 4
- State 6 = saw comma after being in state 5 */
+ State 1 = seen one of our keywords
+ State 2 = waiting for part of an argument */
xgettext_lex (&token);
switch (token.type)
{
- case xgettext_token_type_keyword1:
+ case xgettext_token_type_keyword:
+ if (!extract_all && state == 2)
+ {
+ if (commas_to_skip == 0)
+ {
+ error (0, 0,
+ _("%s:%d: warning: keyword nested in keyword arg"),
+ token.file_name, token.line_number);
+ continue;
+ }
+
+ /* Here we should nest properly, but this would require a
+ potentially unbounded stack. We haven't run across an
+ example that needs this functionality yet. For now,
+ we punt and forget the outer keyword. */
+ error (0, 0,
+ _("%s:%d: warning: keyword between outer keyword and its arg"),
+ token.file_name, token.line_number);
+ }
+ commas_to_skip = token.argnum - 1;
state = 1;
continue;
- case xgettext_token_type_keyword2:
- state = 3;
- continue;
-
case xgettext_token_type_lp:
switch (state)
{
case 1:
+ paren_nesting = 0;
state = 2;
break;
- case 3:
- state = 4;
+ case 2:
+ paren_nesting++;
break;
- default:
- state = 0;
}
continue;
+ case xgettext_token_type_rp:
+ if (state == 2 && paren_nesting != 0)
+ paren_nesting--;
+ else
+ state = 0;
+ continue;
+
case xgettext_token_type_comma:
- state = state == 5 ? 6 : 0;
+ if (state == 2 && commas_to_skip != 0)
+ commas_to_skip -= paren_nesting == 0;
+ else
+ state = 0;
continue;
case xgettext_token_type_string_literal:
- if (extract_all || state == 2 || state == 6)
- {
- remember_a_message (mlp, &token);
- state = 0;
- }
+ if (extract_all || (state == 2 && commas_to_skip == 0))
+ remember_a_message (mlp, &token);
else
{
free (token.string);
- state = (state == 4 || state == 5) ? 5 : 0;
+ state = state == 2 ? 2 : 0;
}
continue;
case xgettext_token_type_symbol:
- state = (state == 4 || state == 5) ? 5 : 0;
+ state = state == 2 ? 2 : 0;
continue;
default:
- state = 0;
- continue;
+ abort ();
case xgettext_token_type_eof:
break;
===================================================================
RCS file: po/Makefile.in.in,v
retrieving revision 0.10.35.0
retrieving revision 0.10.35.5
diff -u -r0.10.35.0 -r0.10.35.5
--- po/Makefile.in.in 1998/07/20 20:20:38 0.10.35.0
+++ po/Makefile.in.in 1998/07/26 09:07:52 0.10.35.5
@@ -62,7 +62,7 @@
$(COMPILE) $<
.po.pox:
- $(MAKE) $(PACKAGE).pot
+ $(MAKE) $(srcdir)/$(PACKAGE).pot
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
.po.mo:
@@ -79,7 +79,7 @@
all: all-@USE_NLS@
-all-yes: cat-id-tbl.c $(CATALOGS)
+all-yes: $(srcdir)/cat-id-tbl.c $(CATALOGS)
all-no:
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
@@ -90,8 +90,8 @@
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
-$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
-$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+$(srcdir)/cat-id-tbl.c: $(srcdir)/stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(srcdir)/$(PACKAGE).pot
rm -f cat-id-tbl.tmp
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
@@ -180,7 +180,8 @@
check: all
-cat-id-tbl.o: ../intl/libgettext.h
+cat-id-tbl.o: $(srcdir)/cat-id-tbl.c $(top_srcdir)/intl/libgettext.h
+ $(COMPILE) $(srcdir)/cat-id-tbl.c
dvi info tags TAGS ID:
@@ -196,7 +197,7 @@
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
- rm -f $(GMOFILES)
+ rm -f $(GMOFILES) cat-id-tbl.c stamp-cat-id
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po $(DISTFILES)
@@ -207,7 +208,7 @@
done
update-po: Makefile
- $(MAKE) $(PACKAGE).pot
+ $(MAKE) $(srcdir)/$(PACKAGE).pot
PATH=`pwd`/../src:$$PATH; \
cd $(srcdir); \
catalogs='$(CATALOGS)'; \

226
gcc/ABOUT-NLS Normal file
View File

@@ -0,0 +1,226 @@
Notes on the Free Translation Project
*************************************
Free software is going international! The Free Translation Project
is a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do *not*
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
One advise in advance
=====================
If you want to exploit the full power of internationalization, you
should configure it using
./configure --with-included-gettext
to force usage of internationalizing routines provided within this
package, despite the existence of internationalizing capabilities in the
operating system where this package is being installed. So far, only
the `gettext' implementation in the GNU C library version 2 provides as
many features (such as locale alias or message inheritance) as the
implementation here. It is also not possible to offer this additional
functionality on top of a `catgets' implementation. Future versions of
GNU `gettext' will very likely convey even more functionality. So it
might be a good idea to change to GNU `gettext' as soon as possible.
So you need not provide this option if you are using GNU libc 2 or
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
INSTALL Matters
===============
Some packages are "localizable" when properly installed; the
programs they contain can be made to speak your own native language.
Most such packages use GNU `gettext'. Other packages have their own
ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system provides
usable `catgets' (if using this is selected by the installer) or
`gettext' functions. If neither is available, the GNU `gettext' own
library will be used. This library is wholly contained within this
package, usually in the `intl/' subdirectory, so prior installation of
the GNU `gettext' package is *not* required. Installers may use
special options at configuration time for changing the default
behaviour. The commands:
./configure --with-included-gettext
./configure --with-catgets
./configure --disable-nls
will respectively bypass any pre-existing `catgets' or `gettext' to use
the internationalizing routines provided within this package, enable
the use of the `catgets' functions (if found on the locale system), or
else, *totally* disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-included-gettext
to prevent auto-detection.
By default the configuration process will not test for the `catgets'
function and therefore they will not be used. The reasons are already
given above: the emulation on top of `catgets' cannot provide all the
extensions provided by the GNU `gettext' library. If you nevertheless
want to use the `catgets' functions use
./configure --with-catgets
to enable the test for `catgets' (this causes no harm if `catgets' is
not available on your system). If you really select this option we
would like to hear about the reasons because we cannot think of any
good one ourself.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
Using This Package
==================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
ISO 639 `LL' two-letter code prior to using the programs in the
package. For example, let's suppose that you speak German. At the
shell prompt, merely execute `setenv LANG de' (in `csh'),
`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
can be done from your `.login' or `.profile' file, once and for all.
An operating system might already offer message localization for
many of its programs, while other programs have been installed locally
with the full capabilities of GNU `gettext'. Just using `gettext'
extended syntax for `LANG' would break proper localization of already
available operating system programs. In this case, users should set
both `LANGUAGE' and `LANG' variables in their environment, as programs
using GNU `gettext' give preference to `LANGUAGE'. For example, some
Swedish users would rather read translations in German than English for
when Swedish is not available. This is easily accomplished by setting
`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
Translating Teams
=================
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list, courtesy of Linux
International. You may reach your translation team at the address
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
language. Language codes are *not* the same as the country codes given
in ISO 3166. The following translation teams exist, as of December
1997:
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
`hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
`pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
Swedish `sv', and Turkish `tr'.
For example, you may reach the Chinese translation team by writing to
`zh@li.org'.
If you'd like to volunteer to *work* at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is *not* the same as the list itself, it has
`-request' appended. For example, speakers of Swedish can send a
message to `sv-request@li.org', having this message body:
subscribe
Keep in mind that team members are expected to participate
*actively* in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `translation@iro.umontreal.ca' to reach the
coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
Available Packages
==================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of December
1997. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination.
Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv
.----------------------------------------------------.
bash | [] [] [] | 3
bison | [] [] [] | 3
clisp | [] [] [] [] | 4
cpio | [] [] [] [] [] [] | 6
diffutils | [] [] [] [] [] | 5
enscript | [] [] [] [] [] [] | 6
fileutils | [] [] [] [] [] [] [] [] [] [] | 10
findutils | [] [] [] [] [] [] [] [] [] | 9
flex | [] [] [] [] | 4
gcal | [] [] [] [] [] | 5
gettext | [] [] [] [] [] [] [] [] [] [] [] | 12
grep | [] [] [] [] [] [] [] [] [] [] | 10
hello | [] [] [] [] [] [] [] [] [] [] [] | 11
id-utils | [] [] [] | 3
indent | [] [] [] [] [] | 5
libc | [] [] [] [] [] [] [] | 7
m4 | [] [] [] [] [] [] | 6
make | [] [] [] [] [] [] | 6
music | [] [] | 2
ptx | [] [] [] [] [] [] [] [] | 8
recode | [] [] [] [] [] [] [] [] [] | 9
sh-utils | [] [] [] [] [] [] [] [] | 8
sharutils | [] [] [] [] [] [] | 6
tar | [] [] [] [] [] [] [] [] [] [] [] | 11
texinfo | [] [] [] | 3
textutils | [] [] [] [] [] [] [] [] [] | 9
wdiff | [] [] [] [] [] [] [] [] | 8
`----------------------------------------------------'
17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv
27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If December 1997 seems to be old, you may fetch a more recent copy
of this `ABOUT-NLS' file on most GNU archive sites.

10652
gcc/ChangeLog.11 Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4003
gcc/ORDERS

File diff suppressed because it is too large Load Diff

View File

@@ -1,144 +0,0 @@
The purpose of GCC pretesting is to verify that the new GCC
distribution, about to be released, works properly on your system *with
no change whatever*, when installed following the precise
recommendations that come with the distribution.
Here are some guidelines on how to do pretesting so as to make it
helpful. All of them follow from common sense together with the
nature of the purpose and the situation.
* It is absolutely vital that you mention even the smallest change or
departure from the standard sources and installation procedure.
Otherwise, you are not testing the same program that I wrote. Testing
a different program is usually of no use whatever. It can even cause
trouble if you fail to tell me that you tested some other program
instead of what I know as GCC. I might think that GCC works, when in
fact it has not been properly tried, and might have a glaring fault.
* Even changing the compilation options counts as a change in the
program. The GCC sources specify which compilation options to use.
Some of them are specified in makefiles, and some in machine-specific
configuration files.
You have ways to override this--but if you do, then you are not
testing what ordinary users will do. Therefore, when pretesting, it
is vital to test with the default compilation options.
(It is okay to test with nonstandard options as well as testing with
the standard ones.)
* The machine and system configuration files of GCC are parts of
GCC. So when you test GCC, you need to do it with the
configuration files that come with GCC.
If GCC does not come with configuration files for a certain machine,
and you test it with configuration files that don't come with GCC,
this is effectively changing GCC. Because the crucial fact about
the planned release is that, without changes, it doesn't work on that
machine.
To make GCC work on that machine, I would need to install new
configuration files. That is not out of the question, since it is
safe--it certainly won't break any other machines that already work.
But you will have to rush me the legal papers to give the FSF
permission to use a large piece of text.
* Look for recommendations for your system.
You can find these recommendations in the Installation node of the
manual, and in the file INSTALL. (These two files have the same text.)
These files say which configuration name to use for your machine, so
use the ones that are recommended. If you guess, you might guess
wrong and encounter spurious difficulties. What's more, if you don't
follow the recommendations then you aren't helping to test that its
recommendations are valid.
These files may describe other things that you need to do to make GCC
work on your machine. If so, you should follow these recommendations
also, for the same reason.
Also look at the Trouble chapter of the manual for items that
pertain to your machine.
* Don't delay sending information.
When you find a problem, please double check it if you can do so
quickly. But don't spend a long time double-checking. A good rule is
always to tell me about every problem on the same day you encounter
it, even if that means you can't find a solution before you report the
problem.
I'd much rather hear about a problem today and a solution tomorrow
than get both of them tomorrow at the same time.
* Make each bug report self-contained.
If you refer back to another message, whether from you or from someone
else, then it will be necessary for anyone who wants to investigate
the bug to find the other message. This may be difficult, it is
probably time-consuming.
To help me save time, simply copy the relevant parts of any previous
messages into your own bug report.
In particular, if I ask you for more information because a bug report
was incomplete, it is best to send me the *entire* collection of
relevant information, all together. If you send just the additional
information, that makes me do extra work. There is even a risk that
I won't remember what question you are sending me the answer to.
* Always be precise when talking about changes you have made. Show
things rather than describing them. Use exact filenames (relative to
the main directory of the distribution), not partial ones. For
example, say "I changed Makefile" rather than "I changed the
makefile". Instead of saying "I defined the MUMBLE macro", send a
diff that shows your change.
* Always use `diff -c' to make diffs. If you don't include context,
it may be hard for me to figure out where you propose to make the
changes. I might have to ignore your patch because I can't tell what
it means.
* When you write a fix, keep in mind that I can't install a change
that would break other systems.
People often suggest fixing a problem by changing machine-independent
files such as toplev.c to do something special that a particular
system needs. Sometimes it is totally obvious that such changes would
break GCC for almost all users. I can't possibly make a change like
that. All I can do is send it back to you and ask you to find a fix
that is safe to install.
Sometimes people send fixes that *might* be an improvement in
general--but it is hard to be sure of this. I can install such
changes some of the time, but not during pretest, when I am trying to
get a new version to work reliably as quickly as possible.
The safest changes for me to install are changes to the configuration
files for a particular machine. At least I know those can't create
bugs on other machines.
* Don't try changing GCC unless it fails to work if you don't change it.
* Don't even suggest changes that would only make GCC cleaner.
Every change I install could introduce a bug, so I won't install
a change unless I see it is necessary.
* If you would like to suggest changes for purposes other than fixing
serious bugs, don't wait till pretest time. Instead, send them just
after I make a release. That's the best time for me to install them.
* In some cases, if you don't follow these guidelines, your
information might still be useful, but I might have to do more work to
make use of it. Unfortunately, I am so far behind in my work that I
just can't get the job done unless you help me to do it efficiently.
Thank you
rms
Local Variables:
mode: text
End:

File diff suppressed because it is too large Load Diff

View File

@@ -1,980 +0,0 @@
/* A Bison parser, made from bi-parser.y with Bison version GNU Bison version 1.24
*/
#define YYBISON 1 /* Identify Bison output. */
#define DEFOP 258
#define STRING 259
#line 22 "bi-parser.y"
#include <stdio.h>
#include "hconfig.h"
#include "bi-defs.h"
extern char yytext[];
extern int yyleng;
/* Chain of all defs built by the parser. */
struct def *defs;
int ndefs;
static struct node *makenode ();
static struct variation *makevar ();
static struct def *makedef ();
void yyerror ();
#line 44 "bi-parser.y"
typedef union
{
char *string;
struct def *def;
struct variation *variation;
struct node *node;
} YYSTYPE;
#ifndef YYLTYPE
typedef
struct yyltype
{
int timestamp;
int first_line;
int first_column;
int last_line;
int last_column;
char *text;
}
yyltype;
#define YYLTYPE yyltype
#endif
#include <stdio.h>
#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif
#define YYFINAL 39
#define YYFLAG -32768
#define YYNTBASE 8
#define YYTRANSLATE(x) ((unsigned)(x) <= 259 ? yytranslate[x] : 17)
static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 5,
7, 2, 2, 6, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 2, 3, 4
};
#if YYDEBUG != 0
static const short yyprhs[] = { 0,
0, 2, 4, 7, 18, 20, 24, 28, 34, 42,
52, 53, 55, 59, 60, 62, 66
};
static const short yyrhs[] = { 9,
0, 10, 0, 9, 10, 0, 3, 5, 4, 6,
13, 6, 5, 11, 7, 7, 0, 12, 0, 11,
6, 12, 0, 5, 13, 7, 0, 5, 13, 6,
14, 7, 0, 5, 13, 6, 14, 6, 14, 7,
0, 5, 13, 6, 14, 6, 14, 6, 14, 7,
0, 0, 4, 0, 5, 15, 7, 0, 0, 16,
0, 16, 6, 15, 0, 4, 0
};
#endif
#if YYDEBUG != 0
static const short yyrline[] = { 0,
60, 65, 67, 71, 76, 78, 82, 85, 87, 89,
93, 95, 98, 101, 105, 108, 112
};
static const char * const yytname[] = { "$","error","$undefined.","DEFOP",
"STRING","'('","','","')'","top","defs","def","variations","variation","opt_string",
"list","items","item",""
};
#endif
static const short yyr1[] = { 0,
8, 9, 9, 10, 11, 11, 12, 12, 12, 12,
13, 13, 14, 14, 15, 15, 16
};
static const short yyr2[] = { 0,
1, 1, 2, 10, 1, 3, 3, 5, 7, 9,
0, 1, 3, 0, 1, 3, 1
};
static const short yydefact[] = { 0,
0, 1, 2, 0, 3, 0, 11, 12, 0, 0,
0, 11, 0, 5, 0, 0, 0, 14, 7, 6,
4, 0, 0, 17, 0, 15, 14, 8, 13, 0,
0, 16, 14, 9, 0, 10, 0, 0, 0
};
static const short yydefgoto[] = { 37,
2, 3, 13, 14, 9, 23, 25, 26
};
static const short yypact[] = { 2,
6, 2,-32768, 8,-32768, 7, 10,-32768, 9, 11,
12, 10, -5,-32768, -3, 12, 13, 14,-32768,-32768,
-32768, 17, 1,-32768, 15, 18, 14,-32768,-32768, 17,
3,-32768, 14,-32768, 16,-32768, 25, 26,-32768
};
static const short yypgoto[] = {-32768,
-32768, 27,-32768, 19, 20, -27, -12,-32768
};
#define YYLAST 35
static const short yytable[] = { 31,
16, 17, 18, 19, 1, 35, 27, 28, 33, 34,
4, 6, 7, 8, 10, 11, 12, 32, 22, 21,
24, 29, 36, 30, 38, 39, 0, 0, 5, 0,
0, 15, 0, 0, 20
};
static const short yycheck[] = { 27,
6, 7, 6, 7, 3, 33, 6, 7, 6, 7,
5, 4, 6, 4, 6, 5, 5, 30, 5, 7,
4, 7, 7, 6, 0, 0, -1, -1, 2, -1,
-1, 12, -1, -1, 16
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/local/share/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
#pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc. */
#endif /* not GNU C. */
#endif /* alloca not defined. */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
as one case of the switch. */
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT return(0)
#define YYABORT return(1)
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(token, value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ yychar = (token), yylval = (value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
{ yyerror ("syntax error: cannot back up"); YYERROR; } \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
#ifndef YYPURE
#define YYLEX yylex()
#endif
#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif
/* If nonreentrant, generate the variables here */
#ifndef YYPURE
int yychar; /* the lookahead symbol */
YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
#ifdef YYLSP_NEEDED
YYLTYPE yylloc; /* location data for the lookahead */
/* symbol */
#endif
int yynerrs; /* number of parse errors so far */
#endif /* not YYPURE */
#if YYDEBUG != 0
int yydebug; /* nonzero means print parse trace */
/* Since this is uninitialized, it does not stop multiple parsers
from coexisting. */
#endif
/* YYINITDEPTH indicates the initial size of the parser's stacks */
#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif
/* YYMAXDEPTH is the maximum size the stacks can grow to
(effective only if the built-in stack extension method is used). */
#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
int yyparse (void);
#endif
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
#ifndef __cplusplus
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_memcpy (from, to, count)
char *from;
char *to;
int count;
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#else /* __cplusplus */
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_memcpy (char *from, char *to, int count)
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#endif
#endif
#line 192 "/usr/local/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#else
#define YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#endif
int
yyparse(YYPARSE_PARAM)
YYPARSE_PARAM_DECL
{
register int yystate;
register int yyn;
register short *yyssp;
register YYSTYPE *yyvsp;
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
short yyssa[YYINITDEPTH]; /* the state stack */
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
#ifdef YYLSP_NEEDED
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK (yyvsp--, yyssp--)
#endif
int yystacksize = YYINITDEPTH;
#ifdef YYPURE
int yychar;
YYSTYPE yylval;
int yynerrs;
#ifdef YYLSP_NEEDED
YYLTYPE yylloc;
#endif
#endif
YYSTYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
int yylen;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Starting parse\n");
#endif
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss - 1;
yyvsp = yyvs;
#ifdef YYLSP_NEEDED
yylsp = yyls;
#endif
/* Push a new state, which is found in yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
yynewstate:
*++yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* Give user a chance to reallocate the stack */
/* Use copies of these so that the &'s don't force the real ones into memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
#endif
/* Get the current used size of the three stacks, in elements. */
int size = yyssp - yyss + 1;
#ifdef yyoverflow
/* Each stack pointer address is followed by the size of
the data in use in that stack, in bytes. */
#ifdef YYLSP_NEEDED
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yyls1, size * sizeof (*yylsp),
&yystacksize);
#else
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yystacksize);
#endif
yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
yyls = yyls1;
#endif
#else /* no yyoverflow */
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
{
yyerror("parser stack overflow");
return 2;
}
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
__yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
__yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
__yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
yylsp = yyls + size - 1;
#endif
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Entering state %d\n", yystate);
#endif
goto yybackup;
yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Reading a token: ");
#endif
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Now at end of input.\n");
#endif
}
else
{
yychar1 = YYTRANSLATE(yychar);
#if YYDEBUG != 0
if (yydebug)
{
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise meaning
of a token, for further debugging info. */
#ifdef YYPRINT
YYPRINT (stderr, yychar, yylval);
#endif
fprintf (stderr, ")\n");
}
#endif
}
yyn += yychar1;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
/* count tokens shifted since error; after three, turn off error status. */
if (yyerrstatus) yyerrstatus--;
yystate = yyn;
goto yynewstate;
/* Do the default action for the current state. */
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
/* Do a reduction. yyn is the number of a rule to reduce with. */
yyreduce:
yylen = yyr2[yyn];
if (yylen > 0)
yyval = yyvsp[1-yylen]; /* implement default value of the action */
#if YYDEBUG != 0
if (yydebug)
{
int i;
fprintf (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
switch (yyn) {
case 1:
#line 62 "bi-parser.y"
{ defs = yyvsp[0].def; ;
break;}
case 3:
#line 68 "bi-parser.y"
{ yyvsp[0].def->next = yyvsp[-1].def; yyval.def = yyvsp[0].def; ;
break;}
case 4:
#line 73 "bi-parser.y"
{ yyval.def = makedef (yyvsp[-7].string, yyvsp[-5].string, yyvsp[-2].variation); ;
break;}
case 6:
#line 79 "bi-parser.y"
{ yyvsp[0].variation->next = yyvsp[-2].variation; yyval.variation = yyvsp[0].variation; ;
break;}
case 7:
#line 84 "bi-parser.y"
{ yyval.variation = makevar (yyvsp[-1].string, (struct node *) NULL, (struct node *) NULL, (struct node *) NULL); ;
break;}
case 8:
#line 86 "bi-parser.y"
{ yyval.variation = makevar (yyvsp[-3].string, yyvsp[-1].node, (struct node *) NULL, (struct node *) NULL); ;
break;}
case 9:
#line 88 "bi-parser.y"
{ yyval.variation = makevar (yyvsp[-5].string, yyvsp[-3].node, yyvsp[-1].node, (struct node *) NULL); ;
break;}
case 10:
#line 90 "bi-parser.y"
{ yyval.variation = makevar (yyvsp[-7].string, yyvsp[-5].node, yyvsp[-3].node, yyvsp[-1].node); ;
break;}
case 11:
#line 94 "bi-parser.y"
{ yyval.string = ""; ;
break;}
case 12:
#line 95 "bi-parser.y"
{ yyval.string = yyvsp[0].string; ;
break;}
case 13:
#line 100 "bi-parser.y"
{ yyval.node = yyvsp[-1].node; ;
break;}
case 14:
#line 102 "bi-parser.y"
{ yyval.node = NULL; ;
break;}
case 16:
#line 109 "bi-parser.y"
{ yyvsp[-2].node->next = yyvsp[0].node; yyval.node = yyvsp[-2].node; ;
break;}
case 17:
#line 114 "bi-parser.y"
{ yyval.node = makenode (yyvsp[0].string); ;
break;}
}
/* the action file gets copied in in place of this dollarsign */
#line 487 "/usr/local/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
#ifdef YYLSP_NEEDED
yylsp -= yylen;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#ifdef YYLSP_NEEDED
yylsp++;
if (yylen == 0)
{
yylsp->first_line = yylloc.first_line;
yylsp->first_column = yylloc.first_column;
yylsp->last_line = (yylsp-1)->last_line;
yylsp->last_column = (yylsp-1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp+yylen-1)->last_line;
yylsp->last_column = (yylsp+yylen-1)->last_column;
}
#endif
/* Now "shift" the result of the reduction.
Determine what state that goes to,
based on the state we popped back to
and the rule number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
yyerrlab: /* here on detecting error */
if (! yyerrstatus)
/* If not already recovering from an error, report this error. */
{
++yynerrs;
#ifdef YYERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
{
int size = 0;
char *msg;
int x, count;
count = 0;
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
size += strlen(yytname[x]) + 15, count++;
msg = (char *) malloc(size + 15);
if (msg != 0)
{
strcpy(msg, "parse error");
if (count < 5)
{
count = 0;
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
{
strcat(msg, count == 0 ? ", expecting `" : " or `");
strcat(msg, yytname[x]);
strcat(msg, "'");
count++;
}
}
yyerror(msg);
free(msg);
}
else
yyerror ("parse error; also virtual memory exceeded");
}
else
#endif /* YYERROR_VERBOSE */
yyerror("parse error");
}
goto yyerrlab1;
yyerrlab1: /* here on error raised explicitly by an action */
if (yyerrstatus == 3)
{
/* if just tried and failed to reuse lookahead token after an error, discard it. */
/* return failure if at end of input */
if (yychar == YYEOF)
YYABORT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token
after shifting the error token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
goto yyerrhandle;
yyerrdefault: /* current state does not do anything special for the error token. */
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (yyn) goto yydefault;
#endif
yyerrpop: /* pop the current state because it cannot handle the error token */
if (yyssp == yyss) YYABORT;
yyvsp--;
yystate = *--yyssp;
#ifdef YYLSP_NEEDED
yylsp--;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
yyerrhandle:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting error token, ");
#endif
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
}
#line 117 "bi-parser.y"
static struct node *
makenode (s)
char *s;
{
struct node *n;
n = (struct node *) malloc (sizeof (struct node));
n->text = s;
n->next = NULL;
return n;
}
static struct variation *
makevar (name, inputs, outputs, literals)
char *name;
struct node *inputs, *outputs, *literals;
{
struct variation *v;
v = (struct variation *) malloc (sizeof (struct variation));
v->name = name;
v->code = ndefs++;
v->inputs = inputs;
v->outputs = outputs;
v->literals = literals;
v->next = NULL;
return v;
}
static struct def *
makedef (name, template, vars)
char *name, *template;
struct variation *vars;
{
struct def *d;
d = (struct def *) malloc (sizeof (struct def));
d->basename = name;
d->template = template;
d->variations = vars;
d->next = NULL;
return d;
}
void
yyerror (s)
char *s;
{
fprintf (stderr, "syntax error in input\n");
exit (FATAL_EXIT_CODE);
}

View File

@@ -1,12 +0,0 @@
typedef union
{
char *string;
struct def *def;
struct variation *variation;
struct node *node;
} YYSTYPE;
#define DEFOP 258
#define STRING 259
extern YYSTYPE yylval;

File diff suppressed because it is too large Load Diff

View File

@@ -1,64 +0,0 @@
typedef union {long itype; tree ttype; enum tree_code code;
char *filename; int lineno; int ends_in_label; } YYSTYPE;
#define IDENTIFIER 258
#define TYPENAME 259
#define SCSPEC 260
#define TYPESPEC 261
#define TYPE_QUAL 262
#define CONSTANT 263
#define STRING 264
#define ELLIPSIS 265
#define SIZEOF 266
#define ENUM 267
#define STRUCT 268
#define UNION 269
#define IF 270
#define ELSE 271
#define WHILE 272
#define DO 273
#define FOR 274
#define SWITCH 275
#define CASE 276
#define DEFAULT 277
#define BREAK 278
#define CONTINUE 279
#define RETURN 280
#define GOTO 281
#define ASM_KEYWORD 282
#define TYPEOF 283
#define ALIGNOF 284
#define ATTRIBUTE 285
#define EXTENSION 286
#define LABEL 287
#define REALPART 288
#define IMAGPART 289
#define ASSIGN 290
#define OROR 291
#define ANDAND 292
#define EQCOMPARE 293
#define ARITHCOMPARE 294
#define LSHIFT 295
#define RSHIFT 296
#define UNARY 297
#define PLUSPLUS 298
#define MINUSMINUS 299
#define HYPERUNARY 300
#define POINTSAT 301
#define INTERFACE 302
#define IMPLEMENTATION 303
#define END 304
#define SELECTOR 305
#define DEFS 306
#define ENCODE 307
#define CLASSNAME 308
#define PUBLIC 309
#define PRIVATE 310
#define PROTECTED 311
#define PROTOCOL 312
#define OBJECTNAME 313
#define CLASS 314
#define ALIAS 315
#define OBJC_STRING 316
extern YYSTYPE yylval;

File diff suppressed because it is too large Load Diff

2142
gcc/cexp.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,32 +0,0 @@
/* config.in. Generated automatically from configure.in by autoheader. */
/* Include the old config.h as config2.h to simplify the transition
to autoconf. */
#include "config2.h"
/* Whether malloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_MALLOC
/* Whether realloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_REALLOC
/* Whether free must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_FREE
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <time.h> header file. */
#undef HAVE_TIME_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

View File

@@ -0,0 +1,104 @@
# Copyright (C) 1996, 1998 Free Software Foundation, Inc.
# Contributed by Richard Henderson (rth@tamu.edu)
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
#
# In addition to the permissions in the GNU General Public License, the
# Free Software Foundation gives you unlimited permission to link the
# compiled version of this file with other programs, and to distribute
# those programs without any restriction coming from the use of this
# file. (The General Public License restrictions do apply in other
# respects; for example, they cover modification of the file, and
# distribution when not linked into another program.)
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# As a special exception, if you link this library with files
# compiled with GCC to produce an executable, this does not cause
# the resulting executable to be covered by the GNU General Public License.
# This exception does not however invalidate any other reasons why
# the executable file might be covered by the GNU General Public License.
#
# Heads of the constructor/destructor lists.
#
# The __*TOR_LIST__ symbols are not global because when this file is used
# in a shared library, we do not want the symbol to fall over to the
# application's lists.
.section .ctors,"aw"
.align 3
__CTOR_LIST__:
.quad -1
.section .dtors,"aw"
.align 3
__DTOR_LIST__:
.quad -1
#
# Fragment of the ELF _fini routine that invokes our dtor cleanup.
#
.section .fini,"ax"
# Since the bits of the _fini function are spread across many
# object files, each potentially with its own GP, we must
# assume we need to load ours. Further, our .fini section
# can easily be more than 4MB away from our .text bits so we
# can't use bsr.
br $29,1f
1: ldgp $29,0($29)
jsr $26,__do_global_dtors_aux
# Must match the alignment we got from crti.o else we get
# zero-filled holes in our _fini function and then SIGILL.
.align 3
#
# Invoke our destructors in order.
#
.text
.align 3
.ent __do_global_dtors_aux
__do_global_dtors_aux:
ldgp $29,0($27)
lda $30,-16($30)
.frame $30,16,$26,0
stq $26,0($30)
.mask 0x4000000,-16
.prologue 1
lda $1,__DTOR_LIST__
br 1f
0: stq $1,8($30)
jsr $26,($27)
ldq $1,8($30)
1: ldq $27,8($1)
addq $1,8,$1
bne $27,0b
ldq $26,0($30)
lda $30,16($30)
ret
.end __do_global_dtors_aux

105
gcc/config/alpha/crtend.asm Normal file
View File

@@ -0,0 +1,105 @@
# Copyright (C) 1996 Free Software Foundation, Inc.
# Contributed by Richard Henderson (rth@tamu.edu)
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
#
# In addition to the permissions in the GNU General Public License, the
# Free Software Foundation gives you unlimited permission to link the
# compiled version of this file with other programs, and to distribute
# those programs without any restriction coming from the use of this
# file. (The General Public License restrictions do apply in other
# respects; for example, they cover modification of the file, and
# distribution when not linked into another program.)
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# As a special exception, if you link this library with files
# compiled with GCC to produce an executable, this does not cause
# the resulting executable to be covered by the GNU General Public License.
# This exception does not however invalidate any other reasons why
# the executable file might be covered by the GNU General Public License.
#
# Tails of the constructor/destructor lists.
#
# The __*TOR_END__ symbols are not global because when this file is used
# in a shared library, we do not want the symbol to fall over to the
# application's lists.
.section .ctors,"aw"
.align 3
__CTOR_END__:
.quad 0
.section .dtors,"aw"
.align 3
__DTOR_END__:
.quad 0
#
# Fragment of the ELF _init routine that invokes our ctor startup
#
.section .init,"ax"
# Since the bits of the _init function are spread across many
# object files, each potentially with its own GP, we must
# assume we need to load ours. Further, our .init section
# can easily be more than 4MB away from our .text bits so we
# can't use bsr.
br $29,1f
1: ldgp $29,0($29)
jsr $26,__do_global_ctors_aux
# Must match the alignment we got from crti.o else we get
# zero-filled holes in our _init function and thense SIGILL.
.align 3
#
# Invoke our destructors in order.
#
.text
.align 3
.ent __do_global_ctors_aux
__do_global_ctors_aux:
ldgp $29,0($27)
lda $30,-16($30)
.frame $30,16,$26,0
stq $9,8($30)
stq $26,0($30)
.mask 0x4000200,-16
.prologue 1
lda $9,__CTOR_END__
br 1f
0: jsr $26,($27)
1: ldq $27,-8($9)
subq $9,8,$9
not $27,$0
bne $0,0b
ldq $26,0($30)
ldq $9,8($30)
lda $30,16($30)
ret
.end __do_global_ctors_aux

9
gcc/config/alpha/t-crtbe Normal file
View File

@@ -0,0 +1,9 @@
# Effectively disable the crtbegin/end rules using crtstuff.c
T = disable
# Assemble startup files.
crtbegin.o: $(srcdir)/config/alpha/crtbegin.asm $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -o crtbegin.o -x assembler $(srcdir)/config/alpha/crtbegin.asm
crtend.o: $(srcdir)/config/alpha/crtend.asm $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -o crtend.o -x assembler $(srcdir)/config/alpha/crtend.asm

View File

@@ -0,0 +1,57 @@
/* Definitions of target machine for GNU compiler. Vxworks Alpha version.
Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file just exists to give specs for the Alpha running on VxWorks. */
#undef CPP_SPEC
#define CPP_SPEC "\
%{mvxsim:-DCPU=SIMALPHADUNIX} \
%{!mvxsim: %{!mcpu*:-DCPU=21064} \
%{mcpu=21064:-DCPU=21064} \
%{mcpu=21164:-DCPU=21164}} \
%{posix: -D_POSIX_SOURCE} \
%{!.S: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}} \
%{.S: -D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}}"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-D__vxworks -D__alpha_vxworks -Asystem(vxworks) \
-Asystem(embedded) -D_LONGLONG -Acpu(alpha) -Amachine(alpha)"
/* VxWorks does all the library stuff itself. */
#undef LIB_SPEC
#define LIB_SPEC ""
/* VxWorks uses object files, not loadable images. make linker just
combine objects. */
#undef LINK_SPEC
#define LINK_SPEC "-r"
/* VxWorks provides the functionality of crt0.o and friends itself. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC ""
#undef ENDFILE_SPEC
#define ENDFILE_SPEC ""
#undef TRANSFER_FROM_TRAMPOLINE

View File

@@ -1,3 +0,0 @@
#define HAVE_STRERROR
#define DONT_DECLARE_SYS_SIGLIST
#define USE_BFD

2212
gcc/config/arc/arc.c Normal file

File diff suppressed because it is too large Load Diff

1643
gcc/config/arc/arc.h Normal file

File diff suppressed because it is too large Load Diff

1630
gcc/config/arc/arc.md Normal file

File diff suppressed because it is too large Load Diff

157
gcc/config/arc/initfini.c Normal file
View File

@@ -0,0 +1,157 @@
/* .init/.fini section handling + C++ global constructor/destructor handling.
This file is based on crtstuff.c, sol2-crti.asm, sol2-crtn.asm.
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this file with files
compiled with GCC to produce an executable, this does not cause
the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
/* Declare a pointer to void function type. */
typedef void (*func_ptr) (void);
#ifdef CRT_INIT
/* NOTE: In order to be able to support SVR4 shared libraries, we arrange
to have one set of symbols { __CTOR_LIST__, __DTOR_LIST__, __CTOR_END__,
__DTOR_END__ } per root executable and also one set of these symbols
per shared library. So in any given whole process image, we may have
multiple definitions of each of these symbols. In order to prevent
these definitions from conflicting with one another, and in order to
ensure that the proper lists are used for the initialization/finalization
of each individual shared library (respectively), we give these symbols
only internal (i.e. `static') linkage, and we also make it a point to
refer to only the __CTOR_END__ symbol in crtfini.o and the __DTOR_LIST__
symbol in crtinit.o, where they are defined. */
static func_ptr __CTOR_LIST__[1] __attribute__ ((section (".ctors")))
= { (func_ptr) (-1) };
static func_ptr __DTOR_LIST__[1] __attribute__ ((section (".dtors")))
= { (func_ptr) (-1) };
/* Run all the global destructors on exit from the program. */
/* Some systems place the number of pointers in the first word of the
table. On SVR4 however, that word is -1. In all cases, the table is
null-terminated. On SVR4, we start from the beginning of the list and
invoke each per-compilation-unit destructor routine in order
until we find that null.
Note that this function MUST be static. There will be one of these
functions in each root executable and one in each shared library, but
although they all have the same code, each one is unique in that it
refers to one particular associated `__DTOR_LIST__' which belongs to the
same particular root executable or shared library file. */
static void __do_global_dtors ()
asm ("__do_global_dtors") __attribute__ ((section (".text")));
static void
__do_global_dtors ()
{
func_ptr *p;
for (p = __DTOR_LIST__ + 1; *p; p++)
(*p) ();
}
/* .init section start.
This must appear at the start of the .init section. */
asm ("
.section .init\n
.global init\n
.word 0\n
init:\n
st blink,[sp,4]\n
st fp,[sp]\n
mov fp,sp\n
sub sp,sp,16\n
");
/* .fini section start.
This must appear at the start of the .init section. */
asm ("
.section .fini\n
.global fini\n
.word 0\n
fini:\n
st blink,[sp,4]\n
st fp,[sp]\n
mov fp,sp\n
sub sp,sp,16\n
bl.nd __do_global_dtors
");
#endif /* CRT_INIT */
#ifdef CRT_FINI
/* Put a word containing zero at the end of each of our two lists of function
addresses. Note that the words defined here go into the .ctors and .dtors
sections of the crtend.o file, and since that file is always linked in
last, these words naturally end up at the very ends of the two lists
contained in these two sections. */
static func_ptr __CTOR_END__[1] __attribute__ ((section (".ctors")))
= { (func_ptr) 0 };
static func_ptr __DTOR_END__[1] __attribute__ ((section (".dtors")))
= { (func_ptr) 0 };
/* Run all global constructors for the program.
Note that they are run in reverse order. */
static void __do_global_ctors ()
asm ("__do_global_ctors") __attribute__ ((section (".text")));
static void
__do_global_ctors ()
{
func_ptr *p;
for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
(*p) ();
}
/* .init section end.
This must live at the end of the .init section. */
asm ("
.section .init\n
bl.nd __do_global_ctors
ld blink,[fp,4]\n
j.d blink\n
ld.a fp,[sp,16]\n
");
/* .fini section end.
This must live at the end of the .fini section. */
asm ("
.section .fini\n
ld blink,[fp,4]\n
j.d blink\n
ld.a fp,[sp,16]\n
");
#endif /* CRT_FINI */

View File

@@ -0,0 +1,273 @@
; libgcc1 routines for ARC cpu.
/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file with other programs, and to distribute
those programs without any restriction coming from the use of this
file. (The General Public License restrictions do apply in other
respects; for example, they cover modification of the file, and
distribution when not linked into another program.)
This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifdef L_mulsi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___mulsi3
___mulsi3:
/* This the simple version.
while (a)
{
if (a & 1)
r += b;
a >>= 1;
b <<= 1;
}
*/
mov r2,0 ; Accumulate result here.
.Lloop:
sub.f 0,r0,0 ; while (a)
nop
beq.nd .Ldone
and.f 0,r0,1 ; if (a & 1)
add.nz r2,r2,r1 ; r += b
lsr r0,r0 ; a >>= 1
b.d .Lloop
lsl r1,r1 ; b <<= 1
.Ldone:
j.d blink
mov r0,r2
#endif
#endif /* L_mulsi3 */
#ifdef L_umulsidi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___umulsidi3
___umulsidi3:
/* This the simple version.
while (a)
{
if (a & 1)
r += b;
a >>= 1;
b <<= 1;
}
*/
mov r2,0 ; Top part of b.
mov r3,0 ; Accumulate result here.
mov r4,0
.Lloop:
sub.f 0,r0,0 ; while (a)
nop
beq.nd .Ldone
and.f 0,r0,1 ; if (a & 1)
add.nz r4,r4,r1 ; r += b
adc.nz r3,r3,r2
lsr r0,r0 ; a >>= 1
lsl.f r1,r1 ; b <<= 1
b.d .Lloop
rlc r2,r2
.Ldone:
#ifdef __big_endian__
mov r1,r4
j.d blink
mov r0,r3
#else
mov r0,r4
j.d blink
mov r1,r3
#endif
#endif
#endif /* L_umulsidi3 */
#ifdef L_divmod_tools
; Utilities used by all routines.
.section .text
.align 4
; inputs: r0 = numerator, r1 = denominator
; outputs: positive r0/r1,
; r6.bit1 = sign of numerator, r6.bit0 = sign of result
.global ___divnorm
___divnorm:
mov r6,0 ; keep sign in r6
sub.f 0,r0,0 ; is numerator -ve?
sub.lt r0,0,r0 ; negate numerator
mov.lt r6,3 ; sign is -ve
sub.f 0,r1,0 ; is denominator -ve?
sub.lt r1,0,r1 ; negate denominator
xor.lt r6,r6,1 ; toggle sign
j.nd blink
/*
unsigned long
udivmodsi4(int modwanted, unsigned long num, unsigned long den)
{
unsigned long bit = 1;
unsigned long res = 0;
while (den < num && bit && !(den & (1L<<31)))
{
den <<=1;
bit <<=1;
}
while (bit)
{
if (num >= den)
{
num -= den;
res |= bit;
}
bit >>=1;
den >>=1;
}
if (modwanted) return num;
return res;
}
*/
; inputs: r0 = numerator, r1 = denominator
; outputs: r0 = quotient, r1 = remainder, r2/r3 trashed
.global ___udivmodsi4
___udivmodsi4:
mov r2,1 ; bit = 1
mov r3,0 ; res = 0
.Lloop1:
sub.f 0,r1,r0 ; while (den < num
nop
bnc.nd .Lloop2
sub.f 0,r2,0 ; && bit
nop
bz.nd .Lloop2
lsl.f 0,r1 ; && !(den & (1<<31))
nop
bc.nd .Lloop2
lsl r1,r1 ; den <<= 1
b.d .Lloop1
lsl r2,r2 ; bit <<= 1
.Lloop2:
sub.f 0,r2,0 ; while (bit)
nop
bz.nd .Ldivmodend
sub.f 0,r0,r1 ; if (num >= den)
nop
bc.nd .Lshiftdown
sub r0,r0,r1 ; num -= den
or r3,r3,r2 ; res |= bit
.Lshiftdown:
lsr r2,r2 ; bit >>= 1
b.d .Lloop2
lsr r1,r1 ; den >>= 1
.Ldivmodend:
mov r1,r0 ; r1 = mod
j.d blink
mov r0,r3 ; r0 = res
#endif
#ifdef L_udivsi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___udivsi3
___udivsi3:
mov r7,blink
bl.nd ___udivmodsi4
j.nd r7
#endif
#endif /* L_udivsi3 */
#ifdef L_divsi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___divsi3
___divsi3:
mov r7,blink
bl.nd ___divnorm
bl.nd ___udivmodsi4
and.f 0,r6,1
sub.nz r0,0,r0 ; cannot go in delay slot, has limm value
j.nd r7
#endif
#endif /* L_divsi3 */
#ifdef L_umodsi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___umodsi3
___umodsi3:
mov r7,blink
bl.nd ___udivmodsi4
j.d r7
mov r0,r1
#endif
#endif /* L_umodsi3 */
#ifdef L_modsi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___modsi3
___modsi3:
mov r7,blink
bl.nd ___divnorm
bl.nd ___udivmodsi4
and.f 0,r6,2
sub.nz r1,0,r1
j.d r7
mov r0,r1
#endif
#endif /* L_modsi3 */

72
gcc/config/arc/t-arc Normal file
View File

@@ -0,0 +1,72 @@
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = arc/lib1funcs.asm
LIB1ASMFUNCS = _mulsi3 _umulsidi3 _udivsi3 _divsi3 _umodsi3 _modsi3 _divmod_tools
# We need libgcc routines to be mangled according to which cpu they
# were compiled for.
# ??? -mmangle-cpu passed by default for now.
#LIBGCC2_CFLAGS = -g1 -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -mmangle-cpu
# These are really part of libgcc1, but this will cause them to be
# built correctly, so...
LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
echo '#ifndef __big_endian__' > dp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
echo '#endif' >> dp-bit.c
cat $(srcdir)/config/fp-bit.c >> dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
echo '#ifndef __big_endian__' >> fp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
echo '#endif' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
# .init/.fini section routines
x-crtinit.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
-DCRT_INIT -finhibit-size-directive -fno-inline-functions \
-g0 -c $(srcdir)/config/arc/initfini.c -o $(dir)/crtinit.o
x-crtfini.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
-DCRT_FINI -finhibit-size-directive -fno-inline-functions \
-g0 -c $(srcdir)/config/arc/initfini.c -o $(dir)/crtfini.o
MULTILIB_OPTIONS = EB
MULTILIB_DIRNAMES = be
# We need our own versions to build multiple copies of crt*.o.
# ??? Use new support in Makefile.
LIBGCC = stmp-multilib-arc
INSTALL_LIBGCC = install-multilib-arc
stmp-multilib-arc: stmp-multilib
for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
dir=`echo $$i | sed -e 's/;.*$$//'`; \
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
CC="$(CC)" CFLAGS="$(CFLAGS)" \
HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
GCC_CFLAGS="$(GCC_CFLAGS) $${flags}" \
INCLUDES="$(INCLUDES)" CRTSTUFF_T_CFLAGS=$(CRTSTUFF_T_CFLAGS) \
dir="$${dir}" x-crtinit.o x-crtfini.o; \
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
done
touch stmp-multilib-arc
install-multilib-arc: install-multilib
for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
dir=`echo $$i | sed -e 's/;.*$$//'`; \
rm -f $(libsubdir)/$${dir}/crtinit.o; \
$(INSTALL_DATA) $${dir}/crtinit.o $(libsubdir)/$${dir}/crtinit.o; \
chmod a-x $(libsubdir)/$${dir}/crtinit.o; \
rm -f $(libsubdir)/$${dir}/crtfini.o; \
$(INSTALL_DATA) $${dir}/crtfini.o $(libsubdir)/$${dir}/crtfini.o; \
chmod a-x $(libsubdir)/$${dir}/crtfini.o; \
done

47
gcc/config/arc/xm-arc.h Normal file
View File

@@ -0,0 +1,47 @@
/* Configuration for GNU C-compiler for the ARC processor.
Copyright (C) 1994, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* #defines that need visibility everywhere. */
#define FALSE 0
#define TRUE 1
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_CHAR 8
#define HOST_BITS_PER_SHORT 16
#define HOST_BITS_PER_INT 32
#define HOST_BITS_PER_LONG 32
#define HOST_BITS_PER_LONGLONG 64
/* Doubles are stored in memory with the high order word first. This
matters when cross-compiling. */
#define HOST_WORDS_BIG_ENDIAN 1
/* target machine dependencies.
tm.h is a symbolic link to the actual target specific file. */
#include "tm.h"
/* Arguments to use with `exit'. */
#define SUCCESS_EXIT_CODE 0
#define FATAL_EXIT_CODE 33
/* If compiled with Sun CC, the use of alloca requires this #include. */
#ifndef __GNUC__
#include "alloca.h"
#endif

View File

@@ -1,10 +0,0 @@
/* Configuration for GCC for ARM running NetBSD as host. */
#include <arm/xm-arm.h>
/* xm-netbsd.h defines this */
#ifdef HAVE_VPRINTF
#undef HAVE_VPRINTF
#endif
#include <xm-netbsd.h>

33
gcc/config/i386/crtdll.h Normal file
View File

@@ -0,0 +1,33 @@
/* Operating system specific defines to be used when targeting GCC for
hosting on Windows32, using GNU tools and the Windows32 API Library,
as distinct from winnt.h, which is used to build GCC for use with a
windows style library and tool set and uses the Microsoft tools.
This variant uses CRTDLL.DLL insted of MSVCRTDLL.DLL.
Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef LIBGCC_SPEC
#define LIBGCC_SPEC "-lmingw32 -lgcc -lmoldname -lcrtdll"
/* Specify a different entry point when linking a DLL */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{mdll:dllcrt1%O%s} %{!mdll:crt1%O%s}"
#undef MATH_LIBRARY
#define MATH_LIBRARY "-lcrtdll"

View File

@@ -0,0 +1,65 @@
! crti.s for OSF/1, x86; derived from sol2-ci.asm.
! Copyright (C) 1993, 1998 Free Software Foundation, Inc.
! Written By Fred Fish, Nov 1992
!
! This file is free software; you can redistribute it and/or modify it
! under the terms of the GNU General Public License as published by the
! Free Software Foundation; either version 2, or (at your option) any
! later version.
!
! In addition to the permissions in the GNU General Public License, the
! Free Software Foundation gives you unlimited permission to link the
! compiled version of this file with other programs, and to distribute
! those programs without any restriction coming from the use of this
! file. (The General Public License restrictions do apply in other
! respects; for example, they cover modification of the file, and
! distribution when not linked into another program.)
!
! This file is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; see the file COPYING. If not, write to
! the Free Software Foundation, 59 Temple Place - Suite 330,
! Boston, MA 02111-1307, USA.
!
! As a special exception, if you link this library with files
! compiled with GCC to produce an executable, this does not cause
! the resulting executable to be covered by the GNU General Public License.
! This exception does not however invalidate any other reasons why
! the executable file might be covered by the GNU General Public License.
!
! This file just supplies labeled starting points for the .init and .fini
! sections. It is linked in before the values-Xx.o files and also before
! crtbegin.o.
.file "crti.s"
.ident "GNU C crti.s"
.section .init
.globl _init
.type _init,@function
_init:
.section .fini
.globl _fini
.type _fini,@function
_fini:
.globl _init_init_routine
.data
.align 4
.type _init_init_routine,@object
.size _init_init_routine,4
_init_init_routine:
.long _init
.globl _init_fini_routine
.align 4
.type _init_fini_routine,@object
.size _init_fini_routine,4
_init_fini_routine:
.long _fini

View File

@@ -0,0 +1,46 @@
! crtn.s for OSF/1, x86; derived from sol2-cn.asm.
! Copyright (C) 1993, 1998 Free Software Foundation, Inc.
! Written By Fred Fish, Nov 1992
!
! This file is free software; you can redistribute it and/or modify it
! under the terms of the GNU General Public License as published by the
! Free Software Foundation; either version 2, or (at your option) any
! later version.
!
! In addition to the permissions in the GNU General Public License, the
! Free Software Foundation gives you unlimited permission to link the
! compiled version of this file with other programs, and to distribute
! those programs without any restriction coming from the use of this
! file. (The General Public License restrictions do apply in other
! respects; for example, they cover modification of the file, and
! distribution when not linked into another program.)
!
! This file is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; see the file COPYING. If not, write to
! the Free Software Foundation, 59 Temple Place - Suite 330,
! Boston, MA 02111-1307, USA.
!
! As a special exception, if you link this library with files
! compiled with GCC to produce an executable, this does not cause
! the resulting executable to be covered by the GNU General Public License.
! This exception does not however invalidate any other reasons why
! the executable file might be covered by the GNU General Public License.
!
! This file just supplies returns for the .init and .fini sections. It is
! linked in after all other files.
.file "crtn.o"
.ident "GNU C crtn.o"
.section .init
ret $0x0
.section .fini
ret $0x0

260
gcc/config/i386/osf1elf.h Normal file
View File

@@ -0,0 +1,260 @@
/* OSF/1 1.3 now is compitable with SVR4, so include sysv4.h, and
put difference here. */
#include <stdio.h>
#include "i386/sysv4.h" /* Base i386 target machine definitions */
#define _sys_siglist sys_siglist
extern char *sys_siglist[];
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i386 OSF/1)");
/* WORD_SWITCH_TAKES_ARG defined in svr4 is not correct. We also
need an extra -soname */
#undef WORD_SWITCH_TAKES_ARG
#define WORD_SWITCH_TAKES_ARG(STR) \
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
|| !strcmp (STR, "Tdata") || !strcmp (STR, "Ttext") \
|| !strcmp (STR, "Tbss") || !strcmp (STR, "soname"))
/* Note, -fpic and -fPIC are equivalent */
#undef CPP_SPEC
#define CPP_SPEC "\
%{fpic: -D__SHARED__} %{fPIC: %{!fpic: -D__SHARED__}} \
%{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
%{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
%{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
%{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \
%{.C: -D__LANGUAGE_C_PLUS_PLUS} \
%{.m: -D__LANGUAGE_OBJECTIVE_C} \
%{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
/* -mmcount or -mno-mcount should be used with -pg or -p */
#undef CC1_SPEC
#define CC1_SPEC "%{p: %{!mmcount: %{!mno-mcount: -mno-mcount }}} \
%{!p: %{pg: %{!mmcount: %{!mno-mcount: -mno-mcount }}}}"
/* Note, -D__NO_UNDERSCORES__ -D__ELF__ are provided in the older version of
OSF/1 gcc. We keep them here, so that old /usr/include/i386/asm.h works.
*/
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-D__NO_UNDERSCORES__ -D__ELF__ -DOSF -DOSF1 -Di386 -Dunix -Asystem(xpg4) -Asystem(osf1) -Acpu(i386) -Amachine(i386)"
/* current OSF/1 doesn't provide separate crti.o and gcrti.o (and also, crtn.o
and gcrtn.o) for profile. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared: \
%{!symbolic: \
%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
crti.o%s \
crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#undef ASM_SPEC
#define ASM_SPEC "%{v*: -v}"
#undef LINK_SPEC
#define LINK_SPEC "%{v*: -v} \
%{h*} %{z*} \
%{dy:-call_shared} %{dn:-static} \
%{static:-static} \
%{shared:-shared} \
%{call_shared:-call_shared} \
%{symbolic:-Bsymbolic -shared -call_shared} \
%{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \
%{noshrlib: -static } \
%{!noshrlib: -call_shared}}}}}}"
#undef MD_EXEC_PREFIX
#define MD_EXEC_PREFIX "/usr/ccs/gcc/"
#undef MD_STARTFILE_PREFIX
#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
/* Define this macro meaning that gcc should find the library 'libgcc.a'
by hand, rather than passing the argument '-lgcc' to tell the linker
to do the search */
#define LINK_LIBGCC_SPECIAL
/* This goes with LINK_LIBGCC_SPECIAL, we need tell libgcc.a differently */
#undef LIBGCC_SPEC
#define LIBGCC_SPEC "%{!shared:%{!symbolic:libgcc.a%s}}"
/* A C statement to output assembler commands which will identify the object
file as having been compile with GNU CC. We don't need or want this for
OSF1. */
#undef ASM_IDENTIFY_GCC
#define ASM_IDENTIFY_GCC(FILE)
/* Identify the front-end which produced this file. To keep symbol
space down, and not confuse kdb, only do this if the language is
not C. */
#define ASM_IDENTIFY_LANGUAGE(STREAM) \
{ \
if (strcmp (lang_identify (), "c") != 0) \
output_lang_identify (STREAM); \
}
/* Specify size_t, ptrdiff_t, and wchar_t types. */
#undef SIZE_TYPE
#undef PTRDIFF_TYPE
#undef WCHAR_TYPE
#undef WCHAR_TYPE_SIZE
#define SIZE_TYPE "long unsigned int"
#define PTRDIFF_TYPE "int"
#define WCHAR_TYPE "unsigned int"
#define WCHAR_TYPE_SIZE BITS_PER_WORD
/* Turn off long double being 96 bits. */
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64
/* Work with OSF/1 profile */
#define MASK_NO_MCOUNT 000200000000 /* profiling uses mcount_ptr */
#define TARGET_MCOUNT ((target_flags & MASK_NO_MCOUNT) == 0)
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "mcount", -MASK_NO_MCOUNT}, \
{ "no-mcount", MASK_NO_MCOUNT},
/* This macro generates the assembly code for function entry.
FILE is a stdio stream to output the code to.
SIZE is an int: how many units of temporary storage to allocate.
Refer to the array `regs_ever_live' to determine which registers
to save; `regs_ever_live[I]' is nonzero if register number I
is ever used in the function. This macro is responsible for
knowing which registers should not be saved even if used.
We override it here to allow for the new profiling code to go before
the prologue and the old mcount code to go after the prologue (and
after %ebx has been set up for ELF shared library support). */
#if 0
#define OSF_PROFILE_BEFORE_PROLOGUE \
(!TARGET_MCOUNT \
&& !current_function_needs_context \
&& (!flag_pic \
|| !frame_pointer_needed \
|| (!current_function_uses_pic_offset_table \
&& !current_function_uses_const_pool)))
#else
#define OSF_PROFILE_BEFORE_PROLOGUE 0
#endif
#undef FUNCTION_PROLOGUE
#define FUNCTION_PROLOGUE(FILE, SIZE) \
do \
{ \
char *prefix = ""; \
char *lprefix = LPREFIX; \
int labelno = profile_label_no; \
\
if (profile_flag && OSF_PROFILE_BEFORE_PROLOGUE) \
{ \
if (!flag_pic) \
{ \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
fprintf (FILE, "\tcall *%s_mcount_ptr\n", prefix); \
} \
\
else \
{ \
static int call_no = 0; \
\
fprintf (FILE, "\tcall %sPc%d\n", lprefix, call_no); \
fprintf (FILE, "%sPc%d:\tpopl %%eax\n", lprefix, call_no); \
fprintf (FILE, "\taddl $_GLOBAL_OFFSET_TABLE_+[.-%sPc%d],%%eax\n", \
lprefix, call_no++); \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%eax),%%edx\n", \
lprefix, labelno); \
fprintf (FILE, "\tmovl %s_mcount_ptr@GOT(%%eax),%%eax\n", \
prefix); \
fprintf (FILE, "\tcall *(%%eax)\n"); \
} \
} \
\
function_prologue (FILE, SIZE); \
} \
while (0)
/* A C statement or compound statement to output to FILE some assembler code to
call the profiling subroutine `mcount'. Before calling, the assembler code
must load the address of a counter variable into a register where `mcount'
expects to find the address. The name of this variable is `LP' followed by
the number LABELNO, so you would generate the name using `LP%d' in a
`fprintf'.
The details of how the address should be passed to `mcount' are determined
by your operating system environment, not by GNU CC. To figure them out,
compile a small program for profiling using the system's installed C
compiler and look at the assembler code that results. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
do \
{ \
if (!OSF_PROFILE_BEFORE_PROLOGUE) \
{ \
char *prefix = ""; \
char *lprefix = LPREFIX; \
int labelno = LABELNO; \
\
/* Note that OSF/rose blew it in terms of calling mcount, \
since OSF/rose prepends a leading underscore, but mcount's \
doesn't. At present, we keep this kludge for ELF as well \
to allow old kernels to build profiling. */ \
\
if (flag_pic \
&& !current_function_uses_pic_offset_table \
&& !current_function_uses_const_pool) \
abort (); \
\
if (TARGET_MCOUNT && flag_pic) \
{ \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
lprefix, labelno); \
fprintf (FILE, "\tcall *%smcount@GOT(%%ebx)\n", prefix); \
} \
\
else if (TARGET_MCOUNT) \
{ \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
fprintf (FILE, "\tcall %smcount\n", prefix); \
} \
\
else if (flag_pic && frame_pointer_needed) \
{ \
fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \
fprintf (FILE, "\tpushl %%ecx\n"); \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
lprefix, labelno); \
fprintf (FILE, "\tmovl _mcount_ptr@GOT(%%ebx),%%eax\n"); \
fprintf (FILE, "\tcall *(%%eax)\n"); \
fprintf (FILE, "\tpopl %%eax\n"); \
} \
\
else if (frame_pointer_needed) \
{ \
fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \
fprintf (FILE, "\tpushl %%ecx\n"); \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
fprintf (FILE, "\tcall *_mcount_ptr\n"); \
fprintf (FILE, "\tpopl %%eax\n"); \
} \
\
else \
abort (); \
} \
} \
while (0)
#if defined (CROSS_COMPILE) && defined (HOST_BITS_PER_INT) && defined (HOST_BITS_PER_LONG) && defined (HOST_BITS_PER_LONGLONG)
#if (HOST_BITS_PER_INT==32) && (HOST_BITS_PER_LONG==64) && (HOST_BITS_PER_LONGLONG==64)
#define REAL_ARITHMETIC
#endif
#endif

View File

@@ -0,0 +1,7 @@
/* Target definitions for GNU compiler for Intel 80386 running OSF/1 1.3+
with gas and gdb. */
/* Use stabs instead of DWARF debug format. */
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#include "i386/osf1elf.h"

169
gcc/config/i386/rtemself.h Normal file
View File

@@ -0,0 +1,169 @@
/* Definitions for Intel 386 running Linux-based GNU systems with ELF format.
Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Eric Youngdale.
Modified for stabs-in-ELF by H.J. Lu.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define LINUX_DEFAULT_ELF
/* A lie, I guess, but the general idea behind linux/ELF is that we are
supposed to be outputting something that will assemble under SVr4.
This gets us pretty close. */
#include <i386/i386.h> /* Base i386 target machine definitions */
#include <i386/att.h> /* Use the i386 AT&T assembler syntax */
#include <linux.h> /* some common stuff */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i386 RTEMS with ELF)");
/* The svr4 ABI for the i386 says that records and unions are returned
in memory. */
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 1
/* This is how to output an element of a case-vector that is relative.
This is only used for PIC code. See comments by the `casesi' insn in
i386.md for an explanation of the expression this outputs. */
#undef ASM_OUTPUT_ADDR_DIFF_ELT
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
/* Indicate that jump tables go in the text section. This is
necessary when compiling PIC code. */
#define JUMP_TABLES_IN_TEXT_SECTION
/* Copy this from the svr4 specifications... */
/* Define the register numbers to be used in Dwarf debugging information.
The SVR4 reference port C compiler uses the following register numbers
in its Dwarf output code:
0 for %eax (gnu regno = 0)
1 for %ecx (gnu regno = 2)
2 for %edx (gnu regno = 1)
3 for %ebx (gnu regno = 3)
4 for %esp (gnu regno = 7)
5 for %ebp (gnu regno = 6)
6 for %esi (gnu regno = 4)
7 for %edi (gnu regno = 5)
The following three DWARF register numbers are never generated by
the SVR4 C compiler or by the GNU compilers, but SDB on x86/svr4
believes these numbers have these meanings.
8 for %eip (no gnu equivalent)
9 for %eflags (no gnu equivalent)
10 for %trapno (no gnu equivalent)
It is not at all clear how we should number the FP stack registers
for the x86 architecture. If the version of SDB on x86/svr4 were
a bit less brain dead with respect to floating-point then we would
have a precedent to follow with respect to DWARF register numbers
for x86 FP registers, but the SDB on x86/svr4 is so completely
broken with respect to FP registers that it is hardly worth thinking
of it as something to strive for compatibility with.
The version of x86/svr4 SDB I have at the moment does (partially)
seem to believe that DWARF register number 11 is associated with
the x86 register %st(0), but that's about all. Higher DWARF
register numbers don't seem to be associated with anything in
particular, and even for DWARF regno 11, SDB only seems to under-
stand that it should say that a variable lives in %st(0) (when
asked via an `=' command) if we said it was in DWARF regno 11,
but SDB still prints garbage when asked for the value of the
variable in question (via a `/' command).
(Also note that the labels SDB prints for various FP stack regs
when doing an `x' command are all wrong.)
Note that these problems generally don't affect the native SVR4
C compiler because it doesn't allow the use of -O with -g and
because when it is *not* optimizing, it allocates a memory
location for each floating-point variable, and the memory
location is what gets described in the DWARF AT_location
attribute for the variable in question.
Regardless of the severe mental illness of the x86/svr4 SDB, we
do something sensible here and we use the following DWARF
register numbers. Note that these are all stack-top-relative
numbers.
11 for %st(0) (gnu regno = 8)
12 for %st(1) (gnu regno = 9)
13 for %st(2) (gnu regno = 10)
14 for %st(3) (gnu regno = 11)
15 for %st(4) (gnu regno = 12)
16 for %st(5) (gnu regno = 13)
17 for %st(6) (gnu regno = 14)
18 for %st(7) (gnu regno = 15)
*/
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \
((n) == 0 ? 0 \
: (n) == 1 ? 2 \
: (n) == 2 ? 1 \
: (n) == 3 ? 3 \
: (n) == 4 ? 6 \
: (n) == 5 ? 7 \
: (n) == 6 ? 5 \
: (n) == 7 ? 4 \
: ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \
: (-1))
/* Output assembler code to FILE to increment profiler label # LABELNO
for profiling a function entry. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
{ \
if (flag_pic) \
{ \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
LPREFIX, (LABELNO)); \
fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
} \
else \
{ \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \
fprintf (FILE, "\tcall mcount\n"); \
} \
}
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "long int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Di386 -Drtems -D__rtems__ \
-Asystem(rtems) -Acpu(i386) -Amachine(i386)"
/* Get perform_* macros to build libgcc.a. */
#include "i386/perform.h"
/* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named
NAME whose size is SIZE bytes and alignment is ALIGN bytes.
Try to use asm_output_aligned_bss to implement this macro. */
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crt0.o%s"
#undef ENDFILE_SPEC

18
gcc/config/i386/t-osf1elf Normal file
View File

@@ -0,0 +1,18 @@
# Assemble startup files.
crti.o: $(srcdir)/config/i386/osf1-ci.asm $(GCC_PASSES)
sed -e '/^!/d' <$(srcdir)/config/i386/osf1-ci.asm >crti.s
$(GCC_FOR_TARGET) -c -o crti.o crti.s
crtn.o: $(srcdir)/config/i386/osf1-cn.asm $(GCC_PASSES)
sed -e '/^!/d' <$(srcdir)/config/i386/osf1-cn.asm >crtn.s
$(GCC_FOR_TARGET) -c -o crtn.o crtn.s
# The pushl in CTOR initialization interferes with frame pointer elimination.
# We need to use -fPIC when we are using gcc to compile the routines in
# crtstuff.c. This is only really needed when we are going to use gcc/g++
# to produce a shared library, but since we don't know ahead of time when
# we will be doing that, we just always use -fPIC when compiling the
# routines in crtstuff.c.
CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer
TARGET_LIBGCC2_CFLAGS = -fPIC

View File

@@ -0,0 +1,8 @@
# Defaults for OSF/1 1.3+
CC = $(OLDCC)
CLIB = -lld
INSTALL = installbsd -c
OLDCC = /usr/ccs/gcc/gcc
X_CFLAGS = -static
# FIXPROTO_DEFINES = -D_XOPEN_SOURCE

View File

@@ -1,11 +0,0 @@
/* Configuration for GCC for Intel i386 running BSDI's BSD/386 as host. */
#include "i386/xm-i386.h"
#define HAVE_STRERROR
/* We have _sys_siglist, but the declaration in <signal.h> conflicts with
the declarations in collect2.c so disable the declarations
in those files. */
#define DONT_DECLARE_SYS_SIGLIST

View File

@@ -1,12 +0,0 @@
/* Configuration for GCC for Intel i386 running DG/ux */
/* looks just like sysv4 for now */
#include "i386/xm-i386.h"
#include "xm-svr4.h"
/* If not compiled with GNU C, use the portable alloca. */
#ifndef __GNUC__
#define USE_C_ALLOCA
#endif

View File

@@ -1,4 +0,0 @@
/* Configuration for GCC for Intel i386 running FreeBSD as host. */
#include <i386/xm-i386.h>
#include <xm-freebsd.h>

View File

@@ -1,5 +0,0 @@
/* Configuration for GCC for Intel i386 running GNU as host. */
#include <i386/xm-i386.h>
#include <xm-gnu.h>

View File

@@ -1,4 +0,0 @@
/* Configuration for GCC for Intel i386 running NetBSD as host. */
#include <i386/xm-i386.h>
#include <xm-netbsd.h>

View File

@@ -0,0 +1,6 @@
/* Configuration for GCC for Intel i386 running OSF/1 1.3. */
#ifndef HZ
#include <machine/machtime.h>
#define HZ DEFAULT_CLK_TCK
#endif

View File

@@ -1,4 +0,0 @@
/* Configuration for GCC for Intel i386 running System V Release 3. */
#include "i386/xm-i386.h"
#include "xm-svr3.h"

View File

@@ -1,24 +0,0 @@
/* Configuration for GNU compiler
for an Intel i386 or later processor running Windows NT 3.x.
Copyright (C) 1994 Free Software Foundation, Inc.
Contributed by Douglas B. Rupp (drupp@cs.washington.edu)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "winnt/xm-winnt.h"
#include "i386/xm-i386.h"

View File

@@ -1,7 +0,0 @@
/* Alliant FX/2800 running Concentrix 2.x. */
/* vfprintf is not present prior to Concentrix 2.2. Unfortunately, there
does not seem to be a cpp symbol that identifies OS revision. Undefine
the following if running 2.1 or older. */
#define HAVE_VPRINTF

View File

@@ -1,7 +0,0 @@
#define USG
#include "m68k/xm-m68k.h"
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)

View File

@@ -1,47 +0,0 @@
/* Definitions of host machine for GNU compiler.
Commodore Amiga A3000UX version.
Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "m68k/xm-m68kv.h" /* Use the System V flavor of m68k host */
#define HAVE_VPRINTF /* Host has vprintf() in library */
#define rindex strrchr
#define index strchr
/* Define FULL_PROTOTYPES for protoize.c, to get <unistd.h> included.
We need this file for things like R_OK, not necessarily prototypes. */
#define FULL_PROTOTYPES
#if defined (__GNUC__) && __GNUC__ == 1
#define alloca __builtin_alloca
#endif
#if 0 /* I don't want individual ports to be inconsistent about this.
I regard fancy_abort as a half-solution and not the right way
to do things. --rms. */
/* The m88k and mips ports make use of fancy_abort to give possibly helpful
abort information rather than just dumping core. They do it in their
tm-* files. It seems more logical that this is a characteristic of
the host machine and not the target machine, so we do it here. */
#define abort fancy_abort /* give possibly helpful abort info */
#endif

View File

@@ -1,9 +0,0 @@
#ifndef USG
#define USG
#endif
#ifndef AUX
#define AUX
#endif
#include "m68k/xm-m68k.h"

View File

@@ -1,19 +0,0 @@
/* USG is needed to prevent trying to use getrusage and getwd. */
#define USG
#include "m68k/xm-m68k.h"
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#define rindex strrchr
#define index strchr
/* If compiling with HPUX compiler, we are probably using alloca.c,
so help it work right. */
#ifndef __GNUC__
#define USE_C_ALLOCA
#endif
/* Don't try to use sys_siglist. */
#define NO_SYS_SIGLIST

View File

@@ -1,4 +0,0 @@
/* Configuration for GCC for Motorola m68k running Linux. */
#include <m68k/xm-m68k.h>
#include <xm-linux.h>

View File

@@ -1,15 +0,0 @@
/* Host environment for 68000's running System V. */
#include "m68k/xm-m68k.h"
#define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#define rindex strrchr
#define index strchr
#ifndef __GNUC__
#define USE_C_ALLOCA
#endif

View File

@@ -1,4 +0,0 @@
/* Configuration for GCC for Motorola 68k running NetBSD as host. */
#include <m68k/xm-m68k.h>
#include <xm-netbsd.h>

View File

@@ -1,5 +0,0 @@
/* Configuration for GCC for Motorola m68k on sun3. */
#define HAVE_POPEN
#include "m68k/xm-m68k.h"

View File

@@ -1,4 +0,0 @@
#include "m68k/xm-m68k.h"
#include "xm-svr3.h"
#define HAVE_VPRINTF

View File

@@ -1,24 +0,0 @@
/* Definitions of target machine for GNU compiler. MIPS ORION version with
GOFAST floating point library.
Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define MIPS_CPU_STRING_DEFAULT "orion"
#include "mips/elfl64.h"

View File

@@ -1,36 +0,0 @@
/* Definitions of target machine for GNU compiler. Sony RISC NEWS (mips)
Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define MIPS_NEWS
#define CPP_PREDEFINES "\
-Dmips -Dhost_mips -Dsony -Dsonyrisc -Dunix \
-DLANGUAGE_C -DMIPSEB -DSYSTYPE_SYSV \
-Asystem(unix) -Asystem(svr3) -Acpu(mips) -Amachine(mips)"
#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
#define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s values-Xt.o%s"
#define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}"
#define MACHINE_TYPE "RISC NEWS-OS SVr4"
#include "mips/mips.h"

71
gcc/config/mips/r3900.h Normal file
View File

@@ -0,0 +1,71 @@
/* Definitions of MIPS sub target machine for GNU compiler.
Toshiba r3900. You should include mips.h after this.
Copyright (C) 1989, 90-6, 1997 Free Software Foundation, Inc.
Contributed by Gavin Koch (gavin@cygnus.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define SUBTARGET_CPP_SPEC "\
%{!mabi=32: %{!mabi=n32: %{!mabi=64: -D__mips_eabi}}} \
%{!msingle-float:-D__mips_soft_float} \
%{mhard-float:%e-mhard-float not supported.} \
%{msingle-float:%{msoft-float: \
%e-msingle-float and -msoft-float can not both be specified.}}"
/* The following is needed because -mips3 and -mips4 set gp64 which in
combination with abi=eabi, causes long64 to be set. */
#define SUBTARGET_CPP_SIZE_SPEC "\
%{mips3:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{mips4:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{!mips3:%{!mips4:%{!m4650:\
-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}} "
/* by default (if not mips-something-else) produce code for the r3900 */
#define SUBTARGET_CC1_SPEC "\
%{mhard-float:%e-mhard-float not supported.} \
%{msingle-float:%{msoft-float: \
%e-msingle-float and -msoft-float can not both be specified.}}"
#define TARGET_DEFAULT (MASK_SOFT_FLOAT | MASK_MIPS3900)
#define MIPS_CPU_STRING_DEFAULT "R3900"
#define MIPS_ISA_DEFAULT 1
#define MULTILIB_DEFAULTS { "EB", "mips1", "msoft-float" }
/* We use the MIPS EABI by default. */
#define MIPS_ABI_DEFAULT ABI_EABI
/* Debugging */
#define DWARF2_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
/* For the 'preferred' cases ("gN" and "ggdbN") we need to tell the
gnu assembler "dwarf-2" */
#define SUBTARGET_ASM_DEBUGGING_SPEC "\
%{!mmips-as: \
%{g:-gdwarf-2} %{g0:-gdwarf-2} %{g1:-gdwarf-2} %{g2:-gdwarf-2} %{g3:-gdwarf-2} \
%{ggdb:-gdwarf-2} %{ggdb0:-gdwarf-2} %{ggdb1:-gdwarf-2} %{ggdb2:-gdwarf-2} %{ggdb3:-gdwarf-2} \
%{gdwarf-2*:-gdwarf-2}} \
%{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
%{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
%{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}"

View File

@@ -1,8 +0,0 @@
#include "mips/xm-mips.h"
#define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)

View File

@@ -1,18 +0,0 @@
#include "mips/xm-mips.h"
#define USG
#define HAVE_VPRINTF
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#if 0
#ifdef __GNUC__
/* The normal irix compiler requires alloca.h or alloca doesn't work.
However, the IRIX compiler doesn't allow alloca to be stored in
something like ptr->field = alloca(), so we just use the normal
C alloca. */
#include <alloca.h>
#endif
#endif

View File

@@ -1,2 +0,0 @@
#include "mips/xm-mips.h"
#include "config/xm-netbsd.h"

View File

@@ -1,6 +0,0 @@
/* This file is for the Sony Mips News running "NewsOS Version 5",
which is really System V. */
#include "mips/xm-sysv.h"
/* Sony has a funny name for this symbol. */
#define sys_siglist _sys_siglist

View File

@@ -1,9 +0,0 @@
#define USG
#include "xm-mips.h"
/* If compiling with mips compiler, we are probably using alloca.c,
so help it work right. */
#ifndef __GNUC__
#define USE_C_ALLOCA
#endif

View File

@@ -1,11 +0,0 @@
#include "mips/xm-sysv.h"
/* SVR4 provides no sys_siglist,
but does offer the same data under another name. */
#define sys_siglist _sys_siglist
/* There is a declaration in /usr/include/signal.h that conflicts with the
declarations in collect2.c and mips-tfile.c, so disable gcc's declarations.
This is at least true for CDC's EP/IX 2.1.1. It is suspected to be true
for RISC/OS 5.x also. */
#define DONT_DECLARE_SYS_SIGLIST

View File

@@ -1,9 +0,0 @@
/* Config file for ns32k running system V. */
#include "ns32k/xm-ns32k.h"
#define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)

View File

@@ -1,10 +0,0 @@
/* Configuration for GCC for ns32k running NetBSD as host. */
#include <ns32k/xm-ns32k.h>
/* ns32k/xm-ns32k.h defines these macros, but we don't need them */
#undef memcmp
#undef memcpy
#undef memset
#include <xm-netbsd.h>

View File

@@ -1,5 +1,7 @@
/* Configuration for GNU C-compiler for hosts running System V Release 3
Copyright (C) 1991, 1993 Free Software Foundation, Inc.
/* Definitions for rtems targetting a SH using elf.
Copyright (C) 1996 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
This file is part of GNU CC.
@@ -18,16 +20,16 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define bcopy(src,dst,len) memcpy ((dst),(src),(len))
#define bzero(dst,len) memset ((dst),0,(len))
#define bcmp(left,right,len) memcmp ((left),(right),(len))
#include "sh/elf.h"
#define rindex strrchr
#define index strchr
/* Specify predefined symbols in preprocessor. */
#define USG
#define HAVE_VPRINTF
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__sh__ -D__ELF__ -Drtems -D__rtems__ \
-Asystem(rtems) -Acpu(sh) -Amachine(sh)"
#ifndef SVR3
#define SVR3
#endif
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "rtems", 0 },
/* end of sparc/rtems.h */

View File

@@ -1,5 +1,6 @@
/* Configuration for GNU C-compiler for UMIPS operating system
Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc.
/* Definitions of target machine for GNU compiler,
for SPARC running in an embedded environment using the ELF file format.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -18,21 +19,24 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/*
* Notes for compiling gcc on umips (v3.0)
* - change the -g in the CFLAGS to a -g3 or take it out all together.
* - do not define DBX_DEBUGGING_INFO in tm.h, it doesn't exist (unless
* you get one from a bsd system)
*/
#include "sol2.h"
#define USG
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc -D__elf__ -Acpu(sparc) -Amachine(sparc)"
#include "mips/xm-mips.h"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
#define bcopy(a,b,c) memcpy((b),(a),(c))
#define bzero(a,b) memset((a),0,(b))
#define bcmp(a,b,c) memcmp((a),(b),(c))
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#define rindex strrchr
#define index strchr
/* Use the default. */
#undef LINK_SPEC
/* Don't set the target flags, this is done by the linker script */
#undef LIB_SPEC
#define LIB_SPEC ""
/* FIXME: until fixed */
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64

View File

@@ -1,5 +1,7 @@
/* Configuration for GNU C-compiler for Intel 80386 running SunOS 4.0.
Copyright (C) 1988 Free Software Foundation, Inc.
/* Definitions of target machine for GNU compiler, for HAL
SPARC running Solaris 2 HALOS
Copyright 1998 Free Software Foundation, Inc.
Contributed by Carol LePage (carolo@hal.com)
This file is part of GNU CC.
@@ -18,10 +20,14 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define USG
/* Need different command line for assembler */
#include "i386/xm-i386.h"
#undef ASM_SPEC
#define ASM_SPEC \
"%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -e1 \
%{fpic:-K PIC} %{fPIC:-K PIC}"
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
/* Need DWARF for debuggers. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG

238
gcc/config/sparc/linux64.h Normal file
View File

@@ -0,0 +1,238 @@
/* Definitions for 64-bit SPARC running Linux with ELF
Copyright 1996, 1997 Free Software Foundation, Inc.
Contributed by David S. Miller (davem@caip.rutgers.edu)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define LINUX_DEFAULT_ELF
/* This is a v9 only compiler. -mv8 is not expected to work. If you want
a v8/v9 compiler, this isn't the place to do it. */
#define SPARC_V9 1 /* See sparc.h. */
#define SPARC_ARCH64 1
/* Don't assume anything about the header files. */
#define NO_IMPLICIT_EXTERN_C
#undef HAVE_ATEXIT
#define HAVE_ATEXIT
#include <sparc/sysv4.h>
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
/* Output at beginning of assembler file. */
/* The .file command should always begin the output. */
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
do { \
output_file_directive (FILE, main_input_filename); \
fprintf (FILE, "\t.version\t\"01.01\"\n"); \
} while (0)
#undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC "-Av9a"
#undef LIBGCC_SPEC
#define LIBGCC_SPEC \
"%{!shared:-lgcc}"
/* Provide a STARTFILE_SPEC appropriate for Linux. Here we add
the Linux magical crtbegin.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
object constructed before entering `main'. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!shared: \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
/* Provide a ENDFILE_SPEC appropriate for Linux. Here we tack on
the Linux magical crtend.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
object constructed before entering `main', followed by a normal
Linux "finalizer" file, `crtn.o'. */
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (sparc64 Linux/ELF)");
/* A v9 compiler with stack-bias, 32 bit integers, 64 bit longs and
64 bit pointers, in a Medium/Anywhere code model environment. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT \
(MASK_V9 + MASK_ARCH64 + MASK_LONG64 + MASK_PTR64 /* + MASK_HARD_QUAD */ \
+ MASK_STACK_BIAS + MASK_MEDANY + MASK_APP_REGS + MASK_EPILOGUE + MASK_FPU)
#undef SIZE_TYPE
#define SIZE_TYPE "long long unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "long long int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "long int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__sparc__ -D__sparc__ -D__sparc_v9__ -D__arch64__ -D__ELF__ -Dunix -Dsparc -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(sparc) -Amachine(sparc)"
#undef CPP_SPEC
#define CPP_SPEC "\
%{fPIC:-D__PIC__ -D__pic__} \
%{fpic:-D__PIC__ -D__pic__} \
%{mint64:-D__INT_MAX__=9223372036854775807LL -D__LONG_MAX__=9223372036854775807LL} \
%{mlong64:-D__LONG_MAX__=9223372036854775807LL} \
%{mlittle-endian:-D__LITTLE_ENDIAN__} \
%{msparclite:-D__sparclite__} \
%{mv8:-D__sparc_v8__} \
%{msupersparc:-D__supersparc__ -D__sparc_v8__} \
%{posix:-D_POSIX_SOURCE} \
"
/* We no longer link with libc_p.a or libg.a by default. If you
* want to profile or debug the Linux C library, please add
* -lc_p or -ggdb to LDFLAGS at the link time, respectively.
*/
#undef LIB_SPEC
#define LIB_SPEC \
"%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
%{!ggdb:-lc} %{ggdb:-lg}}"
/* Provide a LINK_SPEC appropriate for Linux. Here we provide support
for the special GCC options -static and -shared, which allow us to
link things in one of these three modes by applying the appropriate
combinations of options at link-time. We like to support here for
as many of the other GNU linker options as possible. But I don't
have the time to search for those flags. I am sure how to add
support for -soname shared_object_name. H.J.
I took out %{v:%{!V:-V}}. It is too much :-(. They can use
-Wl,-V.
When the -shared link option is used a final link is not being
done. */
/* If ELF is the default format, we should not use /lib/elf. */
#undef LINK_SPEC
#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
%{static:-static}}} \
%{mlittle-endian:-EL} \
"
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
It's safe to pass -s always, even if -g is not used. */
#undef ASM_SPEC
#define ASM_SPEC "\
%{V} \
%{v:%{!V:-V}} \
%{!Qn:-Qy} \
%{n} \
%{T} \
%{Ym,*} \
%{Wa,*:%*} \
-s %{fpic:-K PIC} %{fPIC:-K PIC} \
%{mlittle-endian:-EL} \
%(asm_cpu) \
"
/* Same as sparc.h */
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
/* System V Release 4 uses DWARF debugging info. Buf DWARF1 doesn't do
64-bit anything, so we use DWARF2. */
#undef DWARF2_DEBUGGING_INFO
#undef DWARF_DEBUGGING_INFO
#undef DBX_DEBUGGING_INFO
#define DWARF2_DEBUGGING_INFO
#define DBX_DEBUGGING_INFO
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
#undef ASM_OUTPUT_ALIGNED_LOCAL
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
do { \
fputs ("\t.local\t", (FILE)); \
assemble_name ((FILE), (NAME)); \
putc ('\n', (FILE)); \
ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \
} while (0)
#undef COMMON_ASM_OP
#define COMMON_ASM_OP "\t.common"
/* This is how to output a definition of an internal numbered label where
PREFIX is the class of label and NUM is the number within the class. */
#undef ASM_OUTPUT_INTERNAL_LABEL
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
/* This is how to output a reference to an internal numbered label where
PREFIX is the class of label and NUM is the number within the class. */
#undef ASM_OUTPUT_INTERNAL_LABELREF
#define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM) \
fprintf (FILE, ".L%s%d", PREFIX, NUM)
/* This is how to store into the string LABEL
the symbol_ref name of an internal numbered label where
PREFIX is the class of label and NUM is the number within the class.
This is suitable for output with `assemble_name'. */
#undef ASM_GENERATE_INTERNAL_LABEL
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*.L%s%d", PREFIX, NUM)
/* Stabs doesn't use this, and it confuses a simulator. */
/* ??? Need to see what DWARF needs, if anything. */
#undef ASM_IDENTIFY_GCC
#define ASM_IDENTIFY_GCC(FILE)
/* Define the names of various pseudo-ops used by the Sparc/svr4 assembler.
??? If ints are 64 bits then UNALIGNED_INT_ASM_OP (defined elsewhere) is
misnamed. These should all refer to explicit sizes (half/word/xword?),
anything other than short/int/long/etc. */
#define UNALIGNED_DOUBLE_INT_ASM_OP ".uaxword"
/* DWARF bits. */
/* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets.
Obviously the Dwarf2 folks havn't tried to actually build systems
with their spec. On a 64-bit system, only 64-bit relocs become
RELATIVE relocations. */
/* #define DWARF_OFFSET_SIZE PTR_SIZE */

View File

@@ -0,0 +1,18 @@
/* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
using the system linker. */
#include "sparc/sol2.h"
/* Disable any support for DWARF and DWARF2 if we are using the system linker.
At least up through Solaris 2.6,
the system linker does not work with DWARF or DWARF2,
since it does not have working support for relocations
to unaligned data. */
#ifdef DWARF2_DEBUGGING_INFO
#undef DWARF2_DEBUGGING_INFO
#endif
#ifdef DWARF_DEBUGGING_INFO
#undef DWARF_DEBUGGING_INFO
#endif

View File

@@ -1,6 +1,5 @@
/* Configuration for GCC for Intel i386 running Linux.
Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
Contributed by H.J. Lu (hjl@nynexst.com)
/* Definitions of target machine for GNU compiler, for SunOS 4.x with gas
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -19,6 +18,10 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <arm/xm-arm.h>
#include <xm-linux.h>
/* gas supports unaligned data. */
#define UNALIGNED_DOUBLE_INT_ASM_OP ".uaxword"
#define UNALIGNED_INT_ASM_OP ".uaword"
#define UNALIGNED_SHORT_ASM_OP ".uahalf"
/* defaults.h will define DWARF2_UNWIND_INFO for us. */
#undef DWARF2_UNWIND_INFO

39
gcc/config/sparc/t-elf Normal file
View File

@@ -0,0 +1,39 @@
# we need to supply our own assembly versions of libgcc1.c files,
# since the user may not have native 'cc' available
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = sparc/lb1spc.asm
LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3
# crt0 is built elsewhere
LIBGCC1_TEST =
# These are really part of libgcc1, but this will cause them to be
# built correctly, so...
LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
cat $(srcdir)/config/fp-bit.c > dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
# MULTILIB_OPTIONS should have msparclite too, but we'd have to make
# gas build...
#MULTILIB_OPTIONS = msoft-float mcpu=v8
MULTILIB_OPTIONS = msoft-float
#MULTILIB_DIRNAMES = soft v8
MULTILIB_DIRNAMES = soft
#MULTILIB_MATCHES = msoft-float=mno-fpu mcpu?v8=mv8
MULTILIB_MATCHES = msoft-float=mno-fpu
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
# Assemble startup files.
crti.o: $(srcdir)/config/sparc/sol2-ci.asm $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -o crti.o -x assembler $(srcdir)/config/sparc/sol2-ci.asm
crtn.o: $(srcdir)/config/sparc/sol2-cn.asm $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -o crtn.o -x assembler $(srcdir)/config/sparc/sol2-cn.asm

2
gcc/config/sparc/t-halos Normal file
View File

@@ -0,0 +1,2 @@
# For a native HALOS compile, we need to set -e1 for the assembler
AS=as -e1

View File

@@ -1,4 +0,0 @@
/* Configuration for GCC for Sun SPARC running NetBSD as host. */
#include <sparc/xm-sparc.h>
#include <xm-netbsd.h>

View File

@@ -1,13 +0,0 @@
/* Host environment for the tti "Unicom" PBB 68020 boards */
#include "sparc/xm-sparc.h"
#define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#ifndef __GNUC__
#define USE_C_ALLOCA
#endif

View File

@@ -1,6 +1,5 @@
/* Configuration for GCC for Intel i386 running Linux.
Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
Contributed by H.J. Lu (hjl@nynexst.com)
/* Configuration for GCC for Sparc v9 running 64-bit native.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -19,6 +18,8 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <i386/xm-i386.h>
#include <xm-linux.h>
#include <sparc/xm-sparc.h>
/* This describes the machine the compiler is hosted on. */
#undef HOST_BITS_PER_LONG
#define HOST_BITS_PER_LONG 64

File diff suppressed because it is too large Load Diff

54
gcc/config/v850/t-v850 Normal file
View File

@@ -0,0 +1,54 @@
# CYGNUS LOCAL entire file v850/law
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = v850/lib1funcs.asm
LIB1ASMFUNCS = _mulsi3 \
_divsi3 \
_udivsi3 \
_modsi3 \
_umodsi3 \
_save_2 \
_save_20 \
_save_21 \
_save_22 \
_save_23 \
_save_24 \
_save_25 \
_save_26 \
_save_27 \
_save_28 \
_save_29 \
_save_2c \
_save_20c \
_save_21c \
_save_22c \
_save_23c \
_save_24c \
_save_25c \
_save_26c \
_save_27c \
_save_28c \
_save_29c \
_save_31c \
_save_varargs \
_save_interrupt \
_save_all_interrupt
# These are really part of libgcc1, but this will cause them to be
# built correctly, so...
LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
echo '#endif' >> dp-bit.c
cat $(srcdir)/config/fp-bit.c >> dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
echo '#endif' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
#END CYGNUS LOCAL

1942
gcc/config/v850/v850.c Normal file

File diff suppressed because it is too large Load Diff

1406
gcc/config/v850/v850.h Normal file

File diff suppressed because it is too large Load Diff

1852
gcc/config/v850/v850.md Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,7 @@
/* Configuration for GNU C-compiler for AMD Am29000 processor.
Copyright (C) 1987, 1988, 1993 Free Software Foundation, Inc.
/* CYGNUS LOCAL entire file v850/law */
/* Configuration for NEC V850.
Copyright (C) 1996 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GNU CC.
@@ -29,15 +31,21 @@ Boston, MA 02111-1307, USA. */
#define HOST_BITS_PER_LONG 32
#define HOST_BITS_PER_LONGLONG 64
#define HOST_WORDS_BIG_ENDIAN
/* target machine dependencies.
tm.h is a symbolic link to the actual target specific file. */
#include "tm.h"
/* Arguments to use with `exit'. */
#define SUCCESS_EXIT_CODE 0
#define FATAL_EXIT_CODE 33
/* Ultra is V7, which is closest to USG. */
#define USG
#ifdef __v850__
#ifndef __STDC__
extern char *malloc (), *realloc (), *calloc ();
#else
extern void *malloc (), *realloc (), *calloc ();
#endif
extern void free ();
#endif
/* target machine dependencies.
tm.h is a symbolic link to the actual target specific file. */
#include "tm.h"
/* END CYGNUS LOCAL */

View File

@@ -1,3 +0,0 @@
# If compiling GCC with the Unix assembler, -J will handle a large function.
# With GAS, it should have no effect.
X_CPPFLAGS = -J

View File

@@ -1,7 +0,0 @@
/* Config file for Vax running system V. */
#define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)

4
gcc/config/xm-alloca.h Normal file
View File

@@ -0,0 +1,4 @@
/* If not compiled with GNU C, use the portable alloca. */
#ifndef __GNUC__
#define USE_C_ALLOCA
#endif

View File

@@ -1,33 +0,0 @@
/* Configuration for GNU C-compiler for hosts running FreeBSD.
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file defines machine-independent things specific to a host
running FreeBSD. This file should not be specified as $xm_file itself;
instead $xm_file should be CPU/xm-freebsd.h, which should include both
CPU/xm-CPU.h and this file xm-freebsd.h. */
/* FreeBSD has strerror. */
#define HAVE_STRERROR
/* We have _sys_siglist, but the declaration in <signal.h> conflicts with
the declarations in collect2.c and mips-tfile.c, so disable the declarations
in those files. */
#define DONT_DECLARE_SYS_SIGLIST

View File

@@ -1,47 +0,0 @@
/* Configuration for GCC for Intel i386 running Linux.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
Contributed by H.J. Lu (hjl@nynexst.com)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef HAVE_VPRINTF
#define HAVE_VPRINTF
#undef HAVE_STRERROR
#define HAVE_STRERROR
#undef HAVE_POPEN
#define HAVE_POPEN
#undef POSIX
#define POSIX
#undef DONT_DECLARE_SYS_SIGLIST
#define DONT_DECLARE_SYS_SIGLIST
/* We do have one, but I'd like to use the one come with gcc since
we have been doing that for a long time with USG defined. H.J. */
#define NO_STAB_H
#undef BSTRING
#define BSTRING
#undef bcmp
#undef bcopy
#undef bzero
#undef index
#undef rindex

View File

@@ -1,27 +0,0 @@
/* Configuration for GNU C-compiler for hosts running NetBSD.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file defines machine-independent things specific to a host
running NetBSD. This file should not be specified as $xm_file itself;
instead $xm_file should be CPU/xm-netbsd.h, which should include both
CPU/xm-CPU.h and this file xm-netbsd.h. */
#define HAVE_STRERROR
#define HAVE_VPRINTF

6
gcc/config/xm-siglist.h Normal file
View File

@@ -0,0 +1,6 @@
/* Some systems provide no sys_siglist, but do offer the same data under
another name. */
#define sys_siglist _sys_siglist
#undef SYS_SIGLIST_DECLARED
#define SYS_SIGLIST_DECLARED

34
gcc/config/xm-std32.h Normal file
View File

@@ -0,0 +1,34 @@
/* Configuration for GNU C-compiler for standard 32-bit host machine.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* #defines that need visibility everywhere. */
#define FALSE 0
#define TRUE 1
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_CHAR 8
#define HOST_BITS_PER_SHORT 16
#define HOST_BITS_PER_INT 32
#define HOST_BITS_PER_LONG 32
#define HOST_BITS_PER_LONGLONG 64
/* Arguments to use with `exit'. */
#define SUCCESS_EXIT_CODE 0
#define FATAL_EXIT_CODE 33

View File

@@ -1,35 +0,0 @@
/* Configuration for GNU C-compiler for hosts running System V Release 4
Copyright (C) 1988 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define bcopy(src,dst,len) memcpy ((dst),(src),(len))
#define bzero(dst,len) memset ((dst),0,(len))
#define bcmp(left,right,len) memcmp ((left),(right),(len))
#define rindex strrchr
#define index strchr
#define USG
#define HAVE_VPRINTF
#define POSIX
/* SVR4 provides no sys_siglist,
but does offer the same data under another name. */
#define sys_siglist _sys_siglist

4911
gcc/configure vendored

File diff suppressed because it is too large Load Diff

9451
gcc/cp/ChangeLog.1 Normal file

File diff suppressed because it is too large Load Diff

139
gcc/cp/NEWS Normal file
View File

@@ -0,0 +1,139 @@
*** Changes since G++ version 2.7.2:
* A public review copy of the December 1996 Draft of the ANSI C++
proto-standard is now available. See
http://www.cygnus.com/misc/wp/
for more information.
* Default function arguments in templates will not be evaluated (or
checked for semantic validity) unless they are needed.
* The -ftemplate-depth-NN flag can be used to increase the maximum
recursive template instantiation depth, defaulting to 17. If you need
to use this flag, the compiler will tell you.
* The internal interface between RTTI-using code and the RTTI support
library has changed, so code that uses dynamic_cast should be
recompiled. The RTTI support library has moved from libstdc++ to
libgcc, so you no longer need to link against libstdc++ for a program
that doesn't use the "hosted" library.
* bool is now always the same size as another built-in type. Previously,
a 64-bit RISC target using a 32-bit ABI would have 32-bit pointers and a
64-bit bool. This should only affect Irix 6, which was not supported in
2.7.2.
* new (nothrow) is now supported.
* A flag -Weffc++ has been added for violations of some of the style
guidelines in Scott Meyers' _Effective C++_ books.
* On ELF systems, duplicate copies of symbols with 'initialized common'
linkage (such as template instantiations, vtables, and extern inlines)
will now be discarded by the GNU linker, so you don't need to use -frepo.
This support requires GNU ld from binutils 2.8 or later.
* Partial specialization of class templates is now supported.
* The overload resolution code has been rewritten to conform to the latest
C++ Working Paper. Built-in operators are now considered as candidates
in operator overload resolution. Function template overloading chooses
the more specialized template, and handles base classes in type deduction
and guiding declarations properly. In this release the old code can
still be selected with -fno-ansi-overloading, although this is not
supported and will be removed in a future release.
* RTTI support has been rewritten to work properly and is now on by default.
This means code that uses virtual functions will have a modest space
overhead. You can use the -fno-rtti flag to disable RTTI support.
* Synthesized destructors are no longer made virtual just because the class
already has virtual functions, only if they override a virtual destructor
in a base class. The compiler will warn if this affects your code.
* The g++ driver no longer links with libg++ by default; it is now
functionally identical to the c++ driver.
* (void *)0 is no longer considered a null pointer constant; NULL in
<stddef.h> is now defined as __null, a magic constant of type (void *)
normally, or (size_t) with -ansi.
* The new 'template <>' specialization syntax is now accepted and ignored.
* The name of a class is now implicitly declared in its own scope; A::A
refers to A.
* g++ now uses a new implementation of templates. The basic idea is that
now templates are minimally parsed when seen and then expanded later.
This allows conformant early name binding and instantiation controls,
since instantiations no longer have to go through the parser.
What you get:
+ Inlining of template functions works without any extra effort or
modifications.
+ Instantiations of class templates and methods defined in the class
body are deferred until they are actually needed (unless
-fexternal-templates is specified).
+ Nested types in class templates work.
+ Static data member templates work.
Possible problems:
+ Types and class templates used in templates must be declared
first, or the compiler will assume they are not types, and fail.
+ Similarly, nested types of template type parameters must be tagged
with the 'typename' keyword. In many cases, the compiler will tell
you where you need to add 'typename'.
+ Syntax errors in templates that are never instantiated will now be
diagnosed.
* Synthesized methods are now emitted in any translation units that need
an out-of-line copy. They are no longer affected by #pragma interface
or #pragma implementation.
* Local classes are now supported.
* -Wall no longer implies -W.
The new warning flag, -Wsign-compare, included in -Wall, warns about
dangerous comparisons of signed and unsigned values. Only the flag is
new; it was previously part of -W.
* The new flag, -fno-weak, disables the use of weak symbols.
* __attribute__ can now be attached to types as well as declarations.
* -Woverloaded-virtual now warns if a virtual function in a base class is
hidden in a derived class, rather than warning about virtual functions
being overloaded (even if all of the inherited signatures are
overridden) as it did before.
* The compiler no longer emits a warning if an ellipsis is used as a
function's argument list.
* Exception handling support has been significantly improved and is on by
default. This can result in significant runtime overhead. You can turn
it off with -fno-exceptions.
* Definition of nested types outside of their containing class is now
supported. Use the following source code, as an example.
struct A {
struct B;
B* bp;
};
struct A::B {
int member;
};
* Explicit instantiation of template constructors and destructors is now
supported. Use the following source code, as an example.
template A<int>::A(const A&);
* On the HPPA, some classes that do not define a copy constructor
will be passed and returned in memory again so that functions
returning those types can be inlined.

2158
gcc/cp/g++FAQ.texi Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,91 +0,0 @@
typedef union {long itype; tree ttype; char *strtype; enum tree_code code; flagged_type_tree ftype; } YYSTYPE;
#define IDENTIFIER 258
#define TYPENAME 259
#define SELFNAME 260
#define SCSPEC 261
#define TYPESPEC 262
#define CV_QUALIFIER 263
#define CONSTANT 264
#define STRING 265
#define ELLIPSIS 266
#define SIZEOF 267
#define ENUM 268
#define IF 269
#define ELSE 270
#define WHILE 271
#define DO 272
#define FOR 273
#define SWITCH 274
#define CASE 275
#define DEFAULT 276
#define BREAK 277
#define CONTINUE 278
#define RETURN 279
#define GOTO 280
#define ASM_KEYWORD 281
#define GCC_ASM_KEYWORD 282
#define TYPEOF 283
#define ALIGNOF 284
#define SIGOF 285
#define ATTRIBUTE 286
#define EXTENSION 287
#define LABEL 288
#define REALPART 289
#define IMAGPART 290
#define AGGR 291
#define VISSPEC 292
#define DELETE 293
#define NEW 294
#define THIS 295
#define OPERATOR 296
#define CXX_TRUE 297
#define CXX_FALSE 298
#define NAMESPACE 299
#define TYPENAME_KEYWORD 300
#define USING 301
#define LEFT_RIGHT 302
#define TEMPLATE 303
#define TYPEID 304
#define DYNAMIC_CAST 305
#define STATIC_CAST 306
#define REINTERPRET_CAST 307
#define CONST_CAST 308
#define SCOPE 309
#define EMPTY 310
#define PTYPENAME 311
#define NSNAME 312
#define THROW 313
#define ASSIGN 314
#define OROR 315
#define ANDAND 316
#define MIN_MAX 317
#define EQCOMPARE 318
#define ARITHCOMPARE 319
#define LSHIFT 320
#define RSHIFT 321
#define POINTSAT_STAR 322
#define DOT_STAR 323
#define UNARY 324
#define PLUSPLUS 325
#define MINUSMINUS 326
#define HYPERUNARY 327
#define PAREN_STAR_PAREN 328
#define POINTSAT 329
#define TRY 330
#define CATCH 331
#define TYPENAME_ELLIPSIS 332
#define PRE_PARSED_FUNCTION_DECL 333
#define EXTERN_LANG_STRING 334
#define ALL 335
#define PRE_PARSED_CLASS_DECL 336
#define DEFARG 337
#define DEFARG_MARKER 338
#define TYPENAME_DEFN 339
#define IDENTIFIER_DEFN 340
#define PTYPENAME_DEFN 341
#define END_OF_LINE 342
#define END_OF_SAVED_INPUT 343
extern YYSTYPE yylval;
#define YYEMPTY -2

View File

@@ -1 +0,0 @@
timestamp

100
gcc/dyn-string.c Normal file
View File

@@ -0,0 +1,100 @@
/* An abstract string datatype.
Copyright (C) 1998 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to the Free
Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "config.h"
#include "system.h"
#include "gansidecl.h"
#include "dyn-string.h"
extern char *xmalloc ();
extern char *xrealloc ();
/* Create a new dynamic string capable of holding at least SPACE
characters, including the terminating NUL. If SPACE is 0, it
will be silently increased to 1. */
dyn_string_t
dyn_string_new (space)
int space;
{
dyn_string_t result = (dyn_string_t) xmalloc (sizeof (struct dyn_string));
if (space == 0)
/* We need at least one byte in which to store the terminating
NUL. */
space = 1;
result->allocated = space;
result->s = (char*) xmalloc (space);
result->length = 0;
result->s[0] = '\0';
return result;
}
/* Free the memory used by DS. */
void
dyn_string_delete (ds)
dyn_string_t ds;
{
free (ds->s);
free (ds);
}
/* Append the NUL-terminated string S to DS, resizing DS if
necessary. */
dyn_string_t
dyn_string_append (ds, s)
dyn_string_t ds;
char *s;
{
int len = strlen (s);
dyn_string_resize (ds, ds->length + len + 1 /* '\0' */);
strcpy (ds->s + ds->length, s);
ds->length += len;
return ds;
}
/* Increase the capacity of DS so that it can hold at least SPACE
characters, including the terminating NUL. This function will not
(at present) reduce the capacity of DS. */
dyn_string_t
dyn_string_resize (ds, space)
dyn_string_t ds;
int space;
{
int new_allocated = ds->allocated;
while (space > new_allocated)
new_allocated *= 2;
if (new_allocated != ds->allocated)
{
/* We actually need more space. */
ds->allocated = new_allocated;
ds->s = (char*) xrealloc (ds->s, ds->allocated);
}
return ds;
}

31
gcc/dyn-string.h Normal file
View File

@@ -0,0 +1,31 @@
/* An abstract string datatype.
Copyright (C) 1998 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to the Free
Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
typedef struct dyn_string
{
int allocated; /* The amount of space allocated for the string. */
int length; /* The actual length of the string. */
char *s; /* The string itself, NUL-terminated. */
}* dyn_string_t;
extern dyn_string_t dyn_string_new PROTO((int));
extern void dyn_string_delete PROTO((dyn_string_t));
extern dyn_string_t dyn_string_append PROTO((dyn_string_t, char*));
extern dyn_string_t dyn_string_resize PROTO((dyn_string_t, int));

Some files were not shown because too many files have changed in this diff Show More