Remove files that are no more part of GCC distribution from FSF branch.
This commit is contained in:
parent
c7ca977ef2
commit
888346df5f
13011
contrib/gcc/ChangeLog.0
13011
contrib/gcc/ChangeLog.0
File diff suppressed because it is too large
Load Diff
15903
contrib/gcc/ChangeLog.1
15903
contrib/gcc/ChangeLog.1
File diff suppressed because it is too large
Load Diff
16352
contrib/gcc/ChangeLog.10
16352
contrib/gcc/ChangeLog.10
File diff suppressed because it is too large
Load Diff
14469
contrib/gcc/ChangeLog.2
14469
contrib/gcc/ChangeLog.2
File diff suppressed because it is too large
Load Diff
16860
contrib/gcc/ChangeLog.3
16860
contrib/gcc/ChangeLog.3
File diff suppressed because it is too large
Load Diff
15261
contrib/gcc/ChangeLog.4
15261
contrib/gcc/ChangeLog.4
File diff suppressed because it is too large
Load Diff
14446
contrib/gcc/ChangeLog.5
14446
contrib/gcc/ChangeLog.5
File diff suppressed because it is too large
Load Diff
19208
contrib/gcc/ChangeLog.6
19208
contrib/gcc/ChangeLog.6
File diff suppressed because it is too large
Load Diff
21543
contrib/gcc/ChangeLog.7
21543
contrib/gcc/ChangeLog.7
File diff suppressed because it is too large
Load Diff
14448
contrib/gcc/ChangeLog.8
14448
contrib/gcc/ChangeLog.8
File diff suppressed because it is too large
Load Diff
21488
contrib/gcc/ChangeLog.9
21488
contrib/gcc/ChangeLog.9
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
This README file is copied into the directory for GCC-only header files
|
||||
when fixincludes is run by the makefile for GCC.
|
||||
|
||||
Many of the files in this directory were automatically edited from the
|
||||
standard system header files by the fixincludes process. They are
|
||||
system-specific, and will not work on any other kind of system. They
|
||||
are also not part of GCC. The reason we have to do this is because
|
||||
GCC requires ANSI C headers and many vendors supply ANSI-incompatible
|
||||
headers.
|
||||
|
||||
Because this is an automated process, sometimes headers get "fixed"
|
||||
that do not, strictly speaking, need a fix. As long as nothing is broken
|
||||
by the process, it is just an unfortunate collateral inconvenience.
|
||||
We would like to rectify it, if it is not "too inconvenient".
|
@ -1,324 +0,0 @@
|
||||
/* ANSI and traditional C compatability macros
|
||||
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* ANSI and traditional C compatibility macros
|
||||
|
||||
ANSI C is assumed if __STDC__ is #defined.
|
||||
|
||||
Macro ANSI C definition Traditional C definition
|
||||
----- ---- - ---------- ----------- - ----------
|
||||
ANSI_PROTOTYPES 1 not defined
|
||||
PTR `void *' `char *'
|
||||
PTRCONST `void *const' `char *'
|
||||
LONG_DOUBLE `long double' `double'
|
||||
const not defined `'
|
||||
volatile not defined `'
|
||||
signed not defined `'
|
||||
VA_START(ap, var) va_start(ap, var) va_start(ap)
|
||||
|
||||
Note that it is safe to write "void foo();" indicating a function
|
||||
with no return value, in all K+R compilers we have been able to test.
|
||||
|
||||
For declaring functions with prototypes, we also provide these:
|
||||
|
||||
PARAMS ((prototype))
|
||||
-- for functions which take a fixed number of arguments. Use this
|
||||
when declaring the function. When defining the function, write a
|
||||
K+R style argument list. For example:
|
||||
|
||||
char *strcpy PARAMS ((char *dest, char *source));
|
||||
...
|
||||
char *
|
||||
strcpy (dest, source)
|
||||
char *dest;
|
||||
char *source;
|
||||
{ ... }
|
||||
|
||||
|
||||
VPARAMS ((prototype, ...))
|
||||
-- for functions which take a variable number of arguments. Use
|
||||
PARAMS to declare the function, VPARAMS to define it. For example:
|
||||
|
||||
int printf PARAMS ((const char *format, ...));
|
||||
...
|
||||
int
|
||||
printf VPARAMS ((const char *format, ...))
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
For writing functions which take variable numbers of arguments, we
|
||||
also provide the VA_OPEN, VA_CLOSE, and VA_FIXEDARG macros. These
|
||||
hide the differences between K+R <varargs.h> and C89 <stdarg.h> more
|
||||
thoroughly than the simple VA_START() macro mentioned above.
|
||||
|
||||
VA_OPEN and VA_CLOSE are used *instead of* va_start and va_end.
|
||||
Immediately after VA_OPEN, put a sequence of VA_FIXEDARG calls
|
||||
corresponding to the list of fixed arguments. Then use va_arg
|
||||
normally to get the variable arguments, or pass your va_list object
|
||||
around. You do not declare the va_list yourself; VA_OPEN does it
|
||||
for you.
|
||||
|
||||
Here is a complete example:
|
||||
|
||||
int
|
||||
printf VPARAMS ((const char *format, ...))
|
||||
{
|
||||
int result;
|
||||
|
||||
VA_OPEN (ap, format);
|
||||
VA_FIXEDARG (ap, const char *, format);
|
||||
|
||||
result = vfprintf (stdout, format, ap);
|
||||
VA_CLOSE (ap);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
You can declare variables either before or after the VA_OPEN,
|
||||
VA_FIXEDARG sequence. Also, VA_OPEN and VA_CLOSE are the beginning
|
||||
and end of a block. They must appear at the same nesting level,
|
||||
and any variables declared after VA_OPEN go out of scope at
|
||||
VA_CLOSE. Unfortunately, with a K+R compiler, that includes the
|
||||
argument list. You can have multiple instances of VA_OPEN/VA_CLOSE
|
||||
pairs in a single function in case you need to traverse the
|
||||
argument list more than once.
|
||||
|
||||
For ease of writing code which uses GCC extensions but needs to be
|
||||
portable to other compilers, we provide the GCC_VERSION macro that
|
||||
simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
|
||||
wrappers around __attribute__. Also, __extension__ will be #defined
|
||||
to nothing if it doesn't work. See below.
|
||||
|
||||
This header also defines a lot of obsolete macros:
|
||||
CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID,
|
||||
AND, DOTS, NOARGS. Don't use them. */
|
||||
|
||||
#ifndef _ANSIDECL_H
|
||||
#define _ANSIDECL_H 1
|
||||
|
||||
/* Every source file includes this file,
|
||||
so they will all get the switch for lint. */
|
||||
/* LINTLIBRARY */
|
||||
|
||||
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
|
||||
older preprocessors. Thus we can't define something like this:
|
||||
|
||||
#define HAVE_GCC_VERSION(MAJOR, MINOR) \
|
||||
(__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
|
||||
|
||||
and then test "#if HAVE_GCC_VERSION(2,7)".
|
||||
|
||||
So instead we use the macro below and test it against specific values. */
|
||||
|
||||
/* This macro simplifies testing whether we are using gcc, and if it
|
||||
is of a particular minimum version. (Both major & minor numbers are
|
||||
significant.) This macro will evaluate to 0 if we are not using
|
||||
gcc at all. */
|
||||
#ifndef GCC_VERSION
|
||||
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
#endif /* GCC_VERSION */
|
||||
|
||||
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) || (defined(__alpha) && defined(__cplusplus))
|
||||
/* All known AIX compilers implement these things (but don't always
|
||||
define __STDC__). The RISC/OS MIPS compiler defines these things
|
||||
in SVR4 mode, but does not define __STDC__. */
|
||||
/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
|
||||
C++ compilers, does not define __STDC__, though it acts as if this
|
||||
was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
|
||||
|
||||
#define ANSI_PROTOTYPES 1
|
||||
#define PTR void *
|
||||
#define PTRCONST void *const
|
||||
#define LONG_DOUBLE long double
|
||||
|
||||
#define PARAMS(ARGS) ARGS
|
||||
#define VPARAMS(ARGS) ARGS
|
||||
#define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR)
|
||||
|
||||
/* variadic function helper macros */
|
||||
/* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's
|
||||
use without inhibiting further decls and without declaring an
|
||||
actual variable. */
|
||||
#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy
|
||||
#define VA_CLOSE(AP) } va_end(AP); }
|
||||
#define VA_FIXEDARG(AP, T, N) struct Qdmy
|
||||
|
||||
#undef const
|
||||
#undef volatile
|
||||
#undef signed
|
||||
|
||||
/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
|
||||
it too, but it's not in C89. */
|
||||
#undef inline
|
||||
#if __STDC_VERSION__ > 199901L
|
||||
/* it's a keyword */
|
||||
#else
|
||||
# if GCC_VERSION >= 2007
|
||||
# define inline __inline__ /* __inline__ prevents -pedantic warnings */
|
||||
# else
|
||||
# define inline /* nothing */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* These are obsolete. Do not use. */
|
||||
#ifndef IN_GCC
|
||||
#define CONST const
|
||||
#define VOLATILE volatile
|
||||
#define SIGNED signed
|
||||
|
||||
#define PROTO(type, name, arglist) type name arglist
|
||||
#define EXFUN(name, proto) name proto
|
||||
#define DEFUN(name, arglist, args) name(args)
|
||||
#define DEFUN_VOID(name) name(void)
|
||||
#define AND ,
|
||||
#define DOTS , ...
|
||||
#define NOARGS void
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#else /* Not ANSI C. */
|
||||
|
||||
#undef ANSI_PROTOTYPES
|
||||
#define PTR char *
|
||||
#define PTRCONST PTR
|
||||
#define LONG_DOUBLE double
|
||||
|
||||
#define PARAMS(args) ()
|
||||
#define VPARAMS(args) (va_alist) va_dcl
|
||||
#define VA_START(va_list, var) va_start(va_list)
|
||||
|
||||
#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP); { struct Qdmy
|
||||
#define VA_CLOSE(AP) } va_end(AP); }
|
||||
#define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE)
|
||||
|
||||
/* some systems define these in header files for non-ansi mode */
|
||||
#undef const
|
||||
#undef volatile
|
||||
#undef signed
|
||||
#undef inline
|
||||
#define const
|
||||
#define volatile
|
||||
#define signed
|
||||
#define inline
|
||||
|
||||
#ifndef IN_GCC
|
||||
#define CONST
|
||||
#define VOLATILE
|
||||
#define SIGNED
|
||||
|
||||
#define PROTO(type, name, arglist) type name ()
|
||||
#define EXFUN(name, proto) name()
|
||||
#define DEFUN(name, arglist, args) name arglist args;
|
||||
#define DEFUN_VOID(name) name()
|
||||
#define AND ;
|
||||
#define DOTS
|
||||
#define NOARGS
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#endif /* ANSI C. */
|
||||
|
||||
/* Define macros for some gcc attributes. This permits us to use the
|
||||
macros freely, and know that they will come into play for the
|
||||
version of gcc in which they are supported. */
|
||||
|
||||
#if (GCC_VERSION < 2007)
|
||||
# define __attribute__(x)
|
||||
#endif
|
||||
|
||||
/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
|
||||
#ifndef ATTRIBUTE_MALLOC
|
||||
# if (GCC_VERSION >= 2096)
|
||||
# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
|
||||
# else
|
||||
# define ATTRIBUTE_MALLOC
|
||||
# endif /* GNUC >= 2.96 */
|
||||
#endif /* ATTRIBUTE_MALLOC */
|
||||
|
||||
/* Attributes on labels were valid as of gcc 2.93. */
|
||||
#ifndef ATTRIBUTE_UNUSED_LABEL
|
||||
# if (GCC_VERSION >= 2093)
|
||||
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED_LABEL
|
||||
# endif /* GNUC >= 2.93 */
|
||||
#endif /* ATTRIBUTE_UNUSED_LABEL */
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
#endif /* ATTRIBUTE_UNUSED */
|
||||
|
||||
#ifndef ATTRIBUTE_NORETURN
|
||||
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
||||
#endif /* ATTRIBUTE_NORETURN */
|
||||
|
||||
/* Attribute `nonnull' was valid as of gcc 3.3. */
|
||||
#ifndef ATTRIBUTE_NONNULL
|
||||
# if (GCC_VERSION >= 3003)
|
||||
# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
|
||||
# else
|
||||
# define ATTRIBUTE_NONNULL(m)
|
||||
# endif /* GNUC >= 3.3 */
|
||||
#endif /* ATTRIBUTE_NONNULL */
|
||||
|
||||
/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL.
|
||||
This was the case for the `printf' format attribute by itself
|
||||
before GCC 3.3, but as of 3.3 we need to add the `nonnull'
|
||||
attribute to retain this behavior. */
|
||||
#ifndef ATTRIBUTE_PRINTF
|
||||
#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
|
||||
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
|
||||
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
|
||||
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
|
||||
#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
|
||||
#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
|
||||
#endif /* ATTRIBUTE_PRINTF */
|
||||
|
||||
/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL. A
|
||||
NULL format specifier was allowed as of gcc 3.3. */
|
||||
#ifndef ATTRIBUTE_NULL_PRINTF
|
||||
# if (GCC_VERSION >= 3003)
|
||||
# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
|
||||
# else
|
||||
# define ATTRIBUTE_NULL_PRINTF(m, n)
|
||||
# endif /* GNUC >= 3.3 */
|
||||
# define ATTRIBUTE_NULL_PRINTF_1 ATTRIBUTE_NULL_PRINTF(1, 2)
|
||||
# define ATTRIBUTE_NULL_PRINTF_2 ATTRIBUTE_NULL_PRINTF(2, 3)
|
||||
# define ATTRIBUTE_NULL_PRINTF_3 ATTRIBUTE_NULL_PRINTF(3, 4)
|
||||
# define ATTRIBUTE_NULL_PRINTF_4 ATTRIBUTE_NULL_PRINTF(4, 5)
|
||||
# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6)
|
||||
#endif /* ATTRIBUTE_NULL_PRINTF */
|
||||
|
||||
|
||||
#ifndef ATTRIBUTE_ALIGNED_ALIGNOF
|
||||
# if (GCC_VERSION >= 3000)
|
||||
# define ATTRIBUTE_ALIGNED_ALIGNOF(m) __attribute__ ((__aligned__ (__alignof__ (m))))
|
||||
# else
|
||||
# define ATTRIBUTE_ALIGNED_ALIGNOF(m)
|
||||
# endif /* GNUC >= 3.0 */
|
||||
#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */
|
||||
|
||||
/* We use __extension__ in some places to suppress -pedantic warnings
|
||||
about GCC extensions. This feature didn't work properly before
|
||||
gcc 2.8. */
|
||||
#if GCC_VERSION < 2008
|
||||
#define __extension__
|
||||
#endif
|
||||
|
||||
#endif /* ansidecl.h */
|
File diff suppressed because it is too large
Load Diff
@ -1,72 +0,0 @@
|
||||
/* Utility to pick a temporary filename prefix.
|
||||
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the libiberty library.
|
||||
Libiberty is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
Libiberty 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with libiberty; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h> /* May get P_tmpdir. */
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "libiberty.h"
|
||||
extern char *choose_tmpdir PARAMS ((void));
|
||||
|
||||
/* Name of temporary file.
|
||||
mktemp requires 6 trailing X's. */
|
||||
#define TEMP_FILE "ccXXXXXX"
|
||||
#define TEMP_FILE_LEN (sizeof(TEMP_FILE) - 1)
|
||||
|
||||
/*
|
||||
|
||||
@deftypefn Extension char* choose_temp_base (void)
|
||||
|
||||
Return a prefix for temporary file names or @code{NULL} if unable to
|
||||
find one. The current directory is chosen if all else fails so the
|
||||
program is exited if a temporary directory can't be found (@code{mktemp}
|
||||
fails). The buffer for the result is obtained with @code{xmalloc}.
|
||||
|
||||
This function is provided for backwards compatability only. Its use is
|
||||
not recommended.
|
||||
|
||||
@end deftypefn
|
||||
|
||||
*/
|
||||
|
||||
char *
|
||||
choose_temp_base ()
|
||||
{
|
||||
const char *base = choose_tmpdir ();
|
||||
char *temp_filename;
|
||||
int len;
|
||||
|
||||
len = strlen (base);
|
||||
temp_filename = xmalloc (len + TEMP_FILE_LEN + 1);
|
||||
strcpy (temp_filename, base);
|
||||
strcpy (temp_filename + len, TEMP_FILE);
|
||||
|
||||
mktemp (temp_filename);
|
||||
if (strlen (temp_filename) == 0)
|
||||
abort ();
|
||||
return temp_filename;
|
||||
}
|
@ -1,236 +0,0 @@
|
||||
/* Concatenate variable number of strings.
|
||||
Copyright (C) 1991, 1994, 2001 Free Software Foundation, Inc.
|
||||
Written by Fred Fish @ Cygnus Support
|
||||
|
||||
This file is part of the libiberty library.
|
||||
Libiberty is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
Libiberty 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with libiberty; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @dots{}, @code{NULL})
|
||||
|
||||
Concatenate zero or more of strings and return the result in freshly
|
||||
@code{xmalloc}ed memory. Returns @code{NULL} if insufficient memory is
|
||||
available. The argument list is terminated by the first @code{NULL}
|
||||
pointer encountered. Pointers to empty strings are ignored.
|
||||
|
||||
@end deftypefn
|
||||
|
||||
NOTES
|
||||
|
||||
This function uses xmalloc() which is expected to be a front end
|
||||
function to malloc() that deals with low memory situations. In
|
||||
typical use, if malloc() returns NULL then xmalloc() diverts to an
|
||||
error handler routine which never returns, and thus xmalloc will
|
||||
never return a NULL pointer. If the client application wishes to
|
||||
deal with low memory situations itself, it should supply an xmalloc
|
||||
that just directly invokes malloc and blindly returns whatever
|
||||
malloc returns.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include "ansidecl.h"
|
||||
#include "libiberty.h"
|
||||
#include <sys/types.h> /* size_t */
|
||||
|
||||
#ifdef ANSI_PROTOTYPES
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
|
||||
# if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
# else
|
||||
# if HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
static inline unsigned long vconcat_length PARAMS ((const char *, va_list));
|
||||
static inline unsigned long
|
||||
vconcat_length (first, args)
|
||||
const char *first;
|
||||
va_list args;
|
||||
{
|
||||
unsigned long length = 0;
|
||||
const char *arg;
|
||||
|
||||
for (arg = first; arg ; arg = va_arg (args, const char *))
|
||||
length += strlen (arg);
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
static inline char *vconcat_copy PARAMS ((char *, const char *, va_list));
|
||||
static inline char *
|
||||
vconcat_copy (dst, first, args)
|
||||
char *dst;
|
||||
const char *first;
|
||||
va_list args;
|
||||
{
|
||||
char *end = dst;
|
||||
const char *arg;
|
||||
|
||||
for (arg = first; arg ; arg = va_arg (args, const char *))
|
||||
{
|
||||
unsigned long length = strlen (arg);
|
||||
memcpy (end, arg, length);
|
||||
end += length;
|
||||
}
|
||||
*end = '\000';
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
/* @undocumented concat_length */
|
||||
|
||||
unsigned long
|
||||
concat_length VPARAMS ((const char *first, ...))
|
||||
{
|
||||
unsigned long length;
|
||||
|
||||
VA_OPEN (args, first);
|
||||
VA_FIXEDARG (args, const char *, first);
|
||||
length = vconcat_length (first, args);
|
||||
VA_CLOSE (args);
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
/* @undocumented concat_copy */
|
||||
|
||||
char *
|
||||
concat_copy VPARAMS ((char *dst, const char *first, ...))
|
||||
{
|
||||
char *save_dst;
|
||||
|
||||
VA_OPEN (args, first);
|
||||
VA_FIXEDARG (args, char *, dst);
|
||||
VA_FIXEDARG (args, const char *, first);
|
||||
vconcat_copy (dst, first, args);
|
||||
save_dst = dst; /* With K&R C, dst goes out of scope here. */
|
||||
VA_CLOSE (args);
|
||||
|
||||
return save_dst;
|
||||
}
|
||||
|
||||
char *libiberty_concat_ptr;
|
||||
|
||||
/* @undocumented concat_copy2 */
|
||||
|
||||
char *
|
||||
concat_copy2 VPARAMS ((const char *first, ...))
|
||||
{
|
||||
VA_OPEN (args, first);
|
||||
VA_FIXEDARG (args, const char *, first);
|
||||
vconcat_copy (libiberty_concat_ptr, first, args);
|
||||
VA_CLOSE (args);
|
||||
|
||||
return libiberty_concat_ptr;
|
||||
}
|
||||
|
||||
char *
|
||||
concat VPARAMS ((const char *first, ...))
|
||||
{
|
||||
char *newstr;
|
||||
|
||||
/* First compute the size of the result and get sufficient memory. */
|
||||
VA_OPEN (args, first);
|
||||
VA_FIXEDARG (args, const char *, first);
|
||||
newstr = (char *) xmalloc (vconcat_length (first, args) + 1);
|
||||
VA_CLOSE (args);
|
||||
|
||||
/* Now copy the individual pieces to the result string. */
|
||||
VA_OPEN (args, first);
|
||||
VA_FIXEDARG (args, const char *, first);
|
||||
vconcat_copy (newstr, first, args);
|
||||
VA_CLOSE (args);
|
||||
|
||||
return newstr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @dots{}, @code{NULL})
|
||||
|
||||
Same as @code{concat}, except that if @var{optr} is not @code{NULL} it
|
||||
is freed after the string is created. This is intended to be useful
|
||||
when you're extending an existing string or building up a string in a
|
||||
loop:
|
||||
|
||||
@example
|
||||
str = reconcat (str, "pre-", str, NULL);
|
||||
@end example
|
||||
|
||||
@end deftypefn
|
||||
|
||||
*/
|
||||
|
||||
char *
|
||||
reconcat VPARAMS ((char *optr, const char *first, ...))
|
||||
{
|
||||
char *newstr;
|
||||
|
||||
/* First compute the size of the result and get sufficient memory. */
|
||||
VA_OPEN (args, first);
|
||||
VA_FIXEDARG (args, char *, optr);
|
||||
VA_FIXEDARG (args, const char *, first);
|
||||
newstr = (char *) xmalloc (vconcat_length (first, args) + 1);
|
||||
VA_CLOSE (args);
|
||||
|
||||
/* Now copy the individual pieces to the result string. */
|
||||
VA_OPEN (args, first);
|
||||
VA_FIXEDARG (args, char *, optr);
|
||||
VA_FIXEDARG (args, const char *, first);
|
||||
vconcat_copy (newstr, first, args);
|
||||
if (optr) /* Done before VA_CLOSE so optr stays in scope for K&R C. */
|
||||
free (optr);
|
||||
VA_CLOSE (args);
|
||||
|
||||
return newstr;
|
||||
}
|
||||
|
||||
#ifdef MAIN
|
||||
#define NULLP (char *)0
|
||||
|
||||
/* Simple little test driver. */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
printf ("\"\" = \"%s\"\n", concat (NULLP));
|
||||
printf ("\"a\" = \"%s\"\n", concat ("a", NULLP));
|
||||
printf ("\"ab\" = \"%s\"\n", concat ("a", "b", NULLP));
|
||||
printf ("\"abc\" = \"%s\"\n", concat ("a", "b", "c", NULLP));
|
||||
printf ("\"abcd\" = \"%s\"\n", concat ("ab", "cd", NULLP));
|
||||
printf ("\"abcde\" = \"%s\"\n", concat ("ab", "c", "de", NULLP));
|
||||
printf ("\"abcdef\" = \"%s\"\n", concat ("", "a", "", "bcd", "ef", NULLP));
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
@ -1,23 +0,0 @@
|
||||
/* Alpha extra machine modes.
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* 128-bit floating point. This gets reset in alpha_override_options
|
||||
if VAX float format is in use. */
|
||||
FLOAT_MODE (TF, 16, ieee_quad_format);
|
@ -1,123 +0,0 @@
|
||||
/* Prototypes for alpha.c functions used in the md file & elsewhere.
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
extern int alpha_next_sequence_number;
|
||||
|
||||
extern void literal_section (void);
|
||||
extern void override_options (void);
|
||||
extern int zap_mask (HOST_WIDE_INT);
|
||||
extern int direct_return (void);
|
||||
|
||||
extern int alpha_sa_size (void);
|
||||
extern HOST_WIDE_INT alpha_initial_elimination_offset (unsigned int,
|
||||
unsigned int);
|
||||
extern int alpha_pv_save_size (void);
|
||||
extern int alpha_using_fp (void);
|
||||
extern void alpha_expand_prologue (void);
|
||||
extern void alpha_expand_epilogue (void);
|
||||
extern void alpha_output_filename (FILE *, const char *);
|
||||
extern void alpha_output_lineno (FILE *, int);
|
||||
|
||||
extern bool alpha_const_ok_for_letter_p (HOST_WIDE_INT, int);
|
||||
extern bool alpha_const_double_ok_for_letter_p (rtx, int);
|
||||
extern bool alpha_extra_constraint (rtx, int);
|
||||
|
||||
extern rtx alpha_tablejump_addr_vec (rtx);
|
||||
extern rtx alpha_tablejump_best_label (rtx);
|
||||
|
||||
extern bool alpha_legitimate_address_p (enum machine_mode, rtx, int);
|
||||
extern rtx alpha_legitimize_address (rtx, rtx, enum machine_mode);
|
||||
extern rtx alpha_legitimize_reload_address (rtx, enum machine_mode,
|
||||
int, int, int);
|
||||
|
||||
extern rtx split_small_symbolic_operand (rtx);
|
||||
|
||||
extern void get_aligned_mem (rtx, rtx *, rtx *);
|
||||
extern rtx get_unaligned_address (rtx, int);
|
||||
extern enum reg_class alpha_preferred_reload_class (rtx, enum reg_class);
|
||||
extern enum reg_class secondary_reload_class (enum reg_class,
|
||||
enum machine_mode, rtx, int);
|
||||
|
||||
extern void alpha_set_memflags (rtx, rtx);
|
||||
extern rtx alpha_emit_set_const (rtx, enum machine_mode, HOST_WIDE_INT, int);
|
||||
extern rtx alpha_emit_set_long_const (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
|
||||
extern bool alpha_expand_mov (enum machine_mode, rtx *);
|
||||
extern bool alpha_expand_mov_nobwx (enum machine_mode, rtx *);
|
||||
extern void alpha_emit_floatuns (rtx[]);
|
||||
extern rtx alpha_emit_conditional_move (rtx, enum machine_mode);
|
||||
extern void alpha_split_tfmode_pair (rtx[]);
|
||||
extern void alpha_split_tfmode_frobsign (rtx[], rtx (*)(rtx, rtx, rtx));
|
||||
extern void alpha_expand_unaligned_load (rtx, rtx, HOST_WIDE_INT,
|
||||
HOST_WIDE_INT, int);
|
||||
extern void alpha_expand_unaligned_store (rtx, rtx, HOST_WIDE_INT,
|
||||
HOST_WIDE_INT);
|
||||
extern int alpha_expand_block_move (rtx []);
|
||||
extern int alpha_expand_block_clear (rtx []);
|
||||
extern rtx alpha_expand_zap_mask (HOST_WIDE_INT);
|
||||
extern void alpha_expand_builtin_vector_binop (rtx (*)(rtx, rtx, rtx),
|
||||
enum machine_mode,
|
||||
rtx, rtx, rtx);
|
||||
extern rtx alpha_return_addr (int, rtx);
|
||||
extern rtx alpha_gp_save_rtx (void);
|
||||
extern void print_operand (FILE *, rtx, int);
|
||||
extern void print_operand_address (FILE *, rtx);
|
||||
extern void alpha_initialize_trampoline (rtx, rtx, rtx, int, int, int);
|
||||
|
||||
extern void alpha_va_start (tree, rtx);
|
||||
extern rtx alpha_va_arg (tree, tree);
|
||||
extern rtx function_arg (CUMULATIVE_ARGS, enum machine_mode, tree, int);
|
||||
extern rtx function_value (tree, tree, enum machine_mode);
|
||||
|
||||
extern void alpha_start_function (FILE *, const char *, tree);
|
||||
extern void alpha_end_function (FILE *, const char *, tree);
|
||||
|
||||
extern int alpha_find_lo_sum_using_gp (rtx);
|
||||
|
||||
#ifdef REAL_VALUE_TYPE
|
||||
extern int check_float_value (enum machine_mode, REAL_VALUE_TYPE *, int);
|
||||
#endif
|
||||
|
||||
#ifdef RTX_CODE
|
||||
extern rtx alpha_emit_conditional_branch (enum rtx_code);
|
||||
extern rtx alpha_emit_setcc (enum rtx_code);
|
||||
extern int alpha_split_conditional_move (enum rtx_code, rtx, rtx, rtx, rtx);
|
||||
extern void alpha_emit_xfloating_arith (enum rtx_code, rtx[]);
|
||||
extern void alpha_emit_xfloating_cvt (enum rtx_code, rtx[]);
|
||||
#endif
|
||||
|
||||
extern rtx alpha_need_linkage (const char *, int);
|
||||
extern rtx alpha_use_linkage (rtx, tree, int, int);
|
||||
|
||||
#if TARGET_ABI_OPEN_VMS
|
||||
extern enum avms_arg_type alpha_arg_type (enum machine_mode);
|
||||
extern rtx alpha_arg_info_reg_val (CUMULATIVE_ARGS);
|
||||
#endif
|
||||
|
||||
extern rtx unicosmk_add_call_info_word (rtx);
|
||||
|
||||
#if TARGET_ABI_UNICOSMK
|
||||
extern void unicosmk_defer_case_vector (rtx, rtx);
|
||||
extern void unicosmk_add_extern (const char *);
|
||||
extern void unicosmk_output_align (FILE *, int);
|
||||
extern char * unicosmk_text_section (void);
|
||||
extern char * unicosmk_data_section (void);
|
||||
extern void unicosmk_output_common (FILE *, const char *, int, int);
|
||||
extern int unicosmk_initial_elimination_offset (int, int);
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
* Contributed by Richard Henderson (rth@redhat.com)
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* Assume OSF/1 compatible interfaces. */
|
||||
|
||||
extern void __ieee_set_fp_control (unsigned long int);
|
||||
|
||||
#define IEEE_MAP_DMZ (1UL<<12) /* Map denorm inputs to zero */
|
||||
#define IEEE_MAP_UMZ (1UL<<13) /* Map underflowed outputs to zero */
|
||||
|
||||
static void __attribute__((constructor))
|
||||
set_fast_math (void)
|
||||
{
|
||||
__ieee_set_fp_control (IEEE_MAP_DMZ | IEEE_MAP_UMZ);
|
||||
}
|
@ -1,457 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler, for DEC Alpha w/ELF.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef OBJECT_FORMAT_COFF
|
||||
#undef EXTENDED_COFF
|
||||
#define OBJECT_FORMAT_ELF
|
||||
|
||||
/* ??? Move all SDB stuff from alpha.h to osf.h. */
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
|
||||
#define DBX_DEBUGGING_INFO 1
|
||||
#define DWARF2_DEBUGGING_INFO 1
|
||||
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
|
||||
|
||||
#undef ASM_FINAL_SPEC
|
||||
|
||||
/* alpha/ doesn't use elfos.h for some reason. */
|
||||
#define TARGET_OBJFMT_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
builtin_define ("__ELF__"); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#undef CC1_SPEC
|
||||
#define CC1_SPEC "%{G*}"
|
||||
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}"
|
||||
|
||||
#undef IDENT_ASM_OP
|
||||
#define IDENT_ASM_OP "\t.ident\t"
|
||||
|
||||
/* Output #ident as a .ident. */
|
||||
#undef ASM_OUTPUT_IDENT
|
||||
#define ASM_OUTPUT_IDENT(FILE, NAME) \
|
||||
fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME);
|
||||
|
||||
/* This is how to allocate empty space in some section. The .zero
|
||||
pseudo-op is used for this on most svr4 assemblers. */
|
||||
|
||||
#undef SKIP_ASM_OP
|
||||
#define SKIP_ASM_OP "\t.zero\t"
|
||||
|
||||
#undef ASM_OUTPUT_SKIP
|
||||
#define ASM_OUTPUT_SKIP(FILE, SIZE) \
|
||||
fprintf (FILE, "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n", SKIP_ASM_OP, (SIZE))
|
||||
|
||||
/* Output the label which precedes a jumptable. Note that for all svr4
|
||||
systems where we actually generate jumptables (which is to say every
|
||||
svr4 target except i386, where we use casesi instead) we put the jump-
|
||||
tables into the .rodata section and since other stuff could have been
|
||||
put into the .rodata section prior to any given jumptable, we have to
|
||||
make sure that the location counter for the .rodata section gets pro-
|
||||
perly re-aligned prior to the actual beginning of the jump table. */
|
||||
|
||||
#undef ALIGN_ASM_OP
|
||||
#define ALIGN_ASM_OP "\t.align\t"
|
||||
|
||||
#ifndef ASM_OUTPUT_BEFORE_CASE_LABEL
|
||||
#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) \
|
||||
ASM_OUTPUT_ALIGN ((FILE), 2);
|
||||
#endif
|
||||
|
||||
#undef ASM_OUTPUT_CASE_LABEL
|
||||
#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE) \
|
||||
do { \
|
||||
ASM_OUTPUT_BEFORE_CASE_LABEL (FILE, PREFIX, NUM, JUMPTABLE) \
|
||||
(*targetm.asm_out.internal_label) (FILE, PREFIX, NUM); \
|
||||
} while (0)
|
||||
|
||||
/* The standard SVR4 assembler seems to require that certain builtin
|
||||
library routines (e.g. .udiv) be explicitly declared as .globl
|
||||
in each assembly file where they are referenced. */
|
||||
|
||||
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
|
||||
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
|
||||
(*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0))
|
||||
|
||||
/* This says how to output assembler code to declare an
|
||||
uninitialized external linkage data object. Under SVR4,
|
||||
the linker seems to want the alignment of data objects
|
||||
to depend on their types. We do exactly that here. */
|
||||
|
||||
#undef COMMON_ASM_OP
|
||||
#define COMMON_ASM_OP "\t.comm\t"
|
||||
|
||||
#undef ASM_OUTPUT_ALIGNED_COMMON
|
||||
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
|
||||
do { \
|
||||
fprintf ((FILE), "%s", COMMON_ASM_OP); \
|
||||
assemble_name ((FILE), (NAME)); \
|
||||
fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED ",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
|
||||
} while (0)
|
||||
|
||||
/* This says how to output assembler code to declare an
|
||||
uninitialized internal linkage data object. Under SVR4,
|
||||
the linker seems to want the alignment of data objects
|
||||
to depend on their types. We do exactly that here. */
|
||||
|
||||
#undef ASM_OUTPUT_ALIGNED_LOCAL
|
||||
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
|
||||
do { \
|
||||
if ((SIZE) <= g_switch_value) \
|
||||
sbss_section(); \
|
||||
else \
|
||||
bss_section(); \
|
||||
ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
|
||||
if (!flag_inhibit_size_directive) \
|
||||
ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
|
||||
ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
|
||||
ASM_OUTPUT_LABEL(FILE, NAME); \
|
||||
ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
|
||||
} while (0)
|
||||
|
||||
/* This says how to output assembler code to declare an
|
||||
uninitialized external linkage data object. */
|
||||
|
||||
#undef ASM_OUTPUT_ALIGNED_BSS
|
||||
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
|
||||
do { \
|
||||
ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \
|
||||
} while (0)
|
||||
|
||||
/* Biggest alignment supported by the object file format of this
|
||||
machine. Use this macro to limit the alignment which can be
|
||||
specified using the `__attribute__ ((aligned (N)))' construct. If
|
||||
not defined, the default value is `BIGGEST_ALIGNMENT'.
|
||||
|
||||
This value is really 2^63. Since gcc figures the alignment in bits,
|
||||
we could only potentially get to 2^60 on suitable hosts. Due to other
|
||||
considerations in varasm, we must restrict this to what fits in an int. */
|
||||
|
||||
#undef MAX_OFILE_ALIGNMENT
|
||||
#define MAX_OFILE_ALIGNMENT \
|
||||
(1 << (HOST_BITS_PER_INT < 64 ? HOST_BITS_PER_INT - 2 : 62))
|
||||
|
||||
/* This is the pseudo-op used to generate a contiguous sequence of byte
|
||||
values from a double-quoted string WITHOUT HAVING A TERMINATING NUL
|
||||
AUTOMATICALLY APPENDED. This is the same for most svr4 assemblers. */
|
||||
|
||||
#undef ASCII_DATA_ASM_OP
|
||||
#define ASCII_DATA_ASM_OP "\t.ascii\t"
|
||||
|
||||
#undef READONLY_DATA_SECTION_ASM_OP
|
||||
#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata"
|
||||
#undef BSS_SECTION_ASM_OP
|
||||
#define BSS_SECTION_ASM_OP "\t.section\t.bss"
|
||||
#undef SBSS_SECTION_ASM_OP
|
||||
#define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\"aw\""
|
||||
#undef SDATA_SECTION_ASM_OP
|
||||
#define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\"aw\""
|
||||
|
||||
/* On svr4, we *do* have support for the .init and .fini sections, and we
|
||||
can put stuff in there to be executed before and after `main'. We let
|
||||
crtstuff.c and other files know this by defining the following symbols.
|
||||
The definitions say how to change sections to the .init and .fini
|
||||
sections. This is the same for all known svr4 assemblers. */
|
||||
|
||||
#undef INIT_SECTION_ASM_OP
|
||||
#define INIT_SECTION_ASM_OP "\t.section\t.init"
|
||||
#undef FINI_SECTION_ASM_OP
|
||||
#define FINI_SECTION_ASM_OP "\t.section\t.fini"
|
||||
|
||||
#ifdef HAVE_GAS_SUBSECTION_ORDERING
|
||||
|
||||
#define ASM_SECTION_START_OP "\t.subsection\t-1"
|
||||
|
||||
/* Output assembly directive to move to the beginning of current section. */
|
||||
#define ASM_OUTPUT_SECTION_START(FILE) \
|
||||
fprintf ((FILE), "%s\n", ASM_SECTION_START_OP)
|
||||
|
||||
#endif
|
||||
|
||||
/* A default list of other sections which we might be "in" at any given
|
||||
time. For targets that use additional sections (e.g. .tdesc) you
|
||||
should override this definition in the target-specific file which
|
||||
includes this file. */
|
||||
|
||||
#undef EXTRA_SECTIONS
|
||||
#define EXTRA_SECTIONS in_sbss, in_sdata
|
||||
|
||||
/* A default list of extra section function definitions. For targets
|
||||
that use additional sections (e.g. .tdesc) you should override this
|
||||
definition in the target-specific file which includes this file. */
|
||||
|
||||
#undef EXTRA_SECTION_FUNCTIONS
|
||||
#define EXTRA_SECTION_FUNCTIONS \
|
||||
SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \
|
||||
SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP)
|
||||
|
||||
extern void sbss_section (void);
|
||||
extern void sdata_section (void);
|
||||
|
||||
#undef SECTION_FUNCTION_TEMPLATE
|
||||
#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \
|
||||
void FN (void) \
|
||||
{ \
|
||||
if (in_section != ENUM) \
|
||||
{ \
|
||||
fprintf (asm_out_file, "%s\n", OP); \
|
||||
in_section = ENUM; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Switch into a generic section. */
|
||||
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
|
||||
#define TARGET_ASM_SELECT_SECTION default_elf_select_section
|
||||
|
||||
#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
|
||||
|
||||
/* Define the strings used for the special svr4 .type and .size directives.
|
||||
These strings generally do not vary from one system running svr4 to
|
||||
another, but if a given system (e.g. m88k running svr) needs to use
|
||||
different pseudo-op names for these, they may be overridden in the
|
||||
file which includes this one. */
|
||||
|
||||
#undef TYPE_ASM_OP
|
||||
#define TYPE_ASM_OP "\t.type\t"
|
||||
#undef SIZE_ASM_OP
|
||||
#define SIZE_ASM_OP "\t.size\t"
|
||||
|
||||
/* This is how we tell the assembler that a symbol is weak. */
|
||||
|
||||
#undef ASM_WEAKEN_LABEL
|
||||
#define ASM_WEAKEN_LABEL(FILE, NAME) \
|
||||
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
|
||||
fputc ('\n', FILE); } while (0)
|
||||
|
||||
/* This is how we tell the assembler that two symbols have the same value. */
|
||||
|
||||
#undef ASM_OUTPUT_DEF
|
||||
#define ASM_OUTPUT_DEF(FILE, ALIAS, NAME) \
|
||||
do { \
|
||||
assemble_name(FILE, ALIAS); \
|
||||
fputs(" = ", FILE); \
|
||||
assemble_name(FILE, NAME); \
|
||||
fputc('\n', FILE); \
|
||||
} while (0)
|
||||
|
||||
#undef ASM_OUTPUT_DEF_FROM_DECLS
|
||||
#define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET) \
|
||||
do { \
|
||||
const char *alias = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
|
||||
const char *name = IDENTIFIER_POINTER (TARGET); \
|
||||
if (TREE_CODE (DECL) == FUNCTION_DECL) \
|
||||
{ \
|
||||
fputc ('$', FILE); \
|
||||
assemble_name (FILE, alias); \
|
||||
fputs ("..ng = $", FILE); \
|
||||
assemble_name (FILE, name); \
|
||||
fputs ("..ng\n", FILE); \
|
||||
} \
|
||||
assemble_name(FILE, alias); \
|
||||
fputs(" = ", FILE); \
|
||||
assemble_name(FILE, name); \
|
||||
fputc('\n', FILE); \
|
||||
} while (0)
|
||||
|
||||
/* The following macro defines the format used to output the second
|
||||
operand of the .type assembler directive. Different svr4 assemblers
|
||||
expect various different forms for this operand. The one given here
|
||||
is just a default. You may need to override it in your machine-
|
||||
specific tm.h file (depending upon the particulars of your assembler). */
|
||||
|
||||
#undef TYPE_OPERAND_FMT
|
||||
#define TYPE_OPERAND_FMT "@%s"
|
||||
|
||||
/* Write the extra assembler code needed to declare a function's result.
|
||||
Most svr4 assemblers don't require any special declaration of the
|
||||
result value, but there are exceptions. */
|
||||
|
||||
#ifndef ASM_DECLARE_RESULT
|
||||
#define ASM_DECLARE_RESULT(FILE, RESULT)
|
||||
#endif
|
||||
|
||||
/* These macros generate the special .type and .size directives which
|
||||
are used to set the corresponding fields of the linker symbol table
|
||||
entries in an ELF object file under SVR4. These macros also output
|
||||
the starting labels for the relevant functions/objects. */
|
||||
|
||||
/* Write the extra assembler code needed to declare an object properly. */
|
||||
|
||||
#undef ASM_DECLARE_OBJECT_NAME
|
||||
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
|
||||
do { \
|
||||
HOST_WIDE_INT size; \
|
||||
ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
|
||||
size_directive_output = 0; \
|
||||
if (!flag_inhibit_size_directive \
|
||||
&& DECL_SIZE (DECL) \
|
||||
&& (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \
|
||||
{ \
|
||||
size_directive_output = 1; \
|
||||
ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \
|
||||
} \
|
||||
ASM_OUTPUT_LABEL(FILE, NAME); \
|
||||
} while (0)
|
||||
|
||||
/* Output the size directive for a decl in rest_of_decl_compilation
|
||||
in the case where we did not do so before the initializer.
|
||||
Once we find the error_mark_node, we know that the value of
|
||||
size_directive_output was set
|
||||
by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
|
||||
|
||||
#undef ASM_FINISH_DECLARE_OBJECT
|
||||
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
|
||||
do { \
|
||||
const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
|
||||
HOST_WIDE_INT size; \
|
||||
if (!flag_inhibit_size_directive \
|
||||
&& DECL_SIZE (DECL) \
|
||||
&& ! AT_END && TOP_LEVEL \
|
||||
&& DECL_INITIAL (DECL) == error_mark_node \
|
||||
&& !size_directive_output \
|
||||
&& (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \
|
||||
{ \
|
||||
size_directive_output = 1; \
|
||||
ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* A table of bytes codes used by the ASM_OUTPUT_ASCII and
|
||||
ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table
|
||||
corresponds to a particular byte value [0..255]. For any
|
||||
given byte value, if the value in the corresponding table
|
||||
position is zero, the given character can be output directly.
|
||||
If the table value is 1, the byte must be output as a \ooo
|
||||
octal escape. If the tables value is anything else, then the
|
||||
byte value should be output as a \ followed by the value
|
||||
in the table. Note that we can use standard UN*X escape
|
||||
sequences for many control characters, but we don't use
|
||||
\a to represent BEL because some svr4 assemblers (e.g. on
|
||||
the i386) don't know about that. Also, we don't use \v
|
||||
since some versions of gas, such as 2.2 did not accept it. */
|
||||
|
||||
#undef ESCAPES
|
||||
#define ESCAPES \
|
||||
"\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
|
||||
\0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
|
||||
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\
|
||||
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\
|
||||
\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
|
||||
\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
|
||||
\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
|
||||
\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"
|
||||
|
||||
/* Some svr4 assemblers have a limit on the number of characters which
|
||||
can appear in the operand of a .string directive. If your assembler
|
||||
has such a limitation, you should define STRING_LIMIT to reflect that
|
||||
limit. Note that at least some svr4 assemblers have a limit on the
|
||||
actual number of bytes in the double-quoted string, and that they
|
||||
count each character in an escape sequence as one byte. Thus, an
|
||||
escape sequence like \377 would count as four bytes.
|
||||
|
||||
If your target assembler doesn't support the .string directive, you
|
||||
should define this to zero. */
|
||||
|
||||
#undef STRING_LIMIT
|
||||
#define STRING_LIMIT ((unsigned) 256)
|
||||
#undef STRING_ASM_OP
|
||||
#define STRING_ASM_OP "\t.string\t"
|
||||
|
||||
/* GAS is the only Alpha/ELF assembler. */
|
||||
#undef TARGET_GAS
|
||||
#define TARGET_GAS (1)
|
||||
|
||||
/* Provide a STARTFILE_SPEC appropriate for ELF. Here we add the
|
||||
(even more) magical crtbegin.o file which provides part of the
|
||||
support for getting C++ file-scope static object constructed
|
||||
before entering `main'. */
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#ifdef HAVE_LD_PIE
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
|
||||
crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
|
||||
#else
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!shared: %{pg|p:gcrt1.o%s;:crt1.o%s}}\
|
||||
crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
|
||||
#endif
|
||||
|
||||
/* Provide a ENDFILE_SPEC appropriate for ELF. Here we tack on the
|
||||
magical crtend.o file which provides part of the support for
|
||||
getting C++ file-scope static object constructed before entering
|
||||
`main', followed by a normal ELF "finalizer" file, `crtn.o'. */
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC \
|
||||
"%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
|
||||
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
|
||||
|
||||
/* We support #pragma. */
|
||||
#define HANDLE_SYSV_PRAGMA 1
|
||||
|
||||
/* Select a format to encode pointers in exception handling data. CODE
|
||||
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
|
||||
true if the symbol may be affected by dynamic relocations.
|
||||
|
||||
Since application size is already constrained to <2GB by the form of
|
||||
the ldgp relocation, we can use a 32-bit pc-relative relocation to
|
||||
static data. Dynamic data is accessed indirectly to allow for read
|
||||
only EH sections. */
|
||||
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
|
||||
(((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4)
|
||||
|
||||
/* If defined, a C statement to be executed just prior to the output of
|
||||
assembler code for INSN. */
|
||||
#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
|
||||
(alpha_this_literal_sequence_number = 0, \
|
||||
alpha_this_gpdisp_sequence_number = 0)
|
||||
extern int alpha_this_literal_sequence_number;
|
||||
extern int alpha_this_gpdisp_sequence_number;
|
||||
|
||||
/* Since the bits of the _init and _fini function is spread across
|
||||
many object files, each potentially with its own GP, we must assume
|
||||
we need to load our GP. Further, the .init/.fini section can
|
||||
easily be more than 4MB away from the function to call so we can't
|
||||
use bsr. */
|
||||
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
|
||||
asm (SECTION_OP "\n" \
|
||||
" br $29,1f\n" \
|
||||
"1: ldgp $29,0($29)\n" \
|
||||
" unop\n" \
|
||||
" jsr $26," USER_LABEL_PREFIX #FUNC "\n" \
|
||||
" .align 3\n" \
|
||||
" .previous");
|
||||
|
||||
/* If we have the capability create headers for efficient EH lookup.
|
||||
As of Jan 2002, only glibc 2.2.4 can actually make use of this, but
|
||||
I imagine that other systems will catch up. In the meantime, it
|
||||
doesn't harm to make sure that the data exists to be used later. */
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
#endif
|
@ -1,147 +0,0 @@
|
||||
;; Scheduling description for Alpha EV4.
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; This file is part of GCC.
|
||||
;;
|
||||
;; GCC 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.
|
||||
;;
|
||||
;; GCC 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 GCC; see the file COPYING. If not, write to
|
||||
;; the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
;; Boston, MA 02111-1307, USA.
|
||||
|
||||
; On EV4 there are two classes of resources to consider: resources needed
|
||||
; to issue, and resources needed to execute. IBUS[01] are in the first
|
||||
; category. ABOX, BBOX, EBOX, FBOX, IMUL & FDIV make up the second.
|
||||
; (There are a few other register-like resources, but ...)
|
||||
|
||||
(define_automaton "ev4_0,ev4_1,ev4_2")
|
||||
(define_cpu_unit "ev4_ib0,ev4_ib1,ev4_abox,ev4_bbox" "ev4_0")
|
||||
(define_cpu_unit "ev4_ebox,ev4_imul" "ev4_1")
|
||||
(define_cpu_unit "ev4_fbox,ev4_fdiv" "ev4_2")
|
||||
(define_reservation "ev4_ib01" "ev4_ib0|ev4_ib1")
|
||||
|
||||
; Assume type "multi" single issues.
|
||||
(define_insn_reservation "ev4_multi" 1
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "multi"))
|
||||
"ev4_ib0+ev4_ib1")
|
||||
|
||||
; Loads from L0 completes in three cycles. adjust_cost still factors
|
||||
; in user-specified memory latency, so return 1 here.
|
||||
(define_insn_reservation "ev4_ld" 1
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "ild,fld,ldsym"))
|
||||
"ev4_ib01+ev4_abox")
|
||||
|
||||
; Stores can issue before the data (but not address) is ready.
|
||||
(define_insn_reservation "ev4_ist" 1
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "ist"))
|
||||
"ev4_ib1+ev4_abox")
|
||||
|
||||
(define_insn_reservation "ev4_fst" 1
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "fst"))
|
||||
"ev4_ib0+ev4_abox")
|
||||
|
||||
; Branches have no delay cost, but do tie up the unit for two cycles.
|
||||
(define_insn_reservation "ev4_ibr" 2
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "ibr,jsr"))
|
||||
"ev4_ib1+ev4_bbox,ev4_bbox")
|
||||
|
||||
(define_insn_reservation "ev4_callpal" 2
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "callpal"))
|
||||
"ev4_ib1+ev4_bbox,ev4_bbox")
|
||||
|
||||
(define_insn_reservation "ev4_fbr" 2
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "fbr"))
|
||||
"ev4_ib0+ev4_bbox,ev4_bbox")
|
||||
|
||||
; Arithmetic insns are normally have their results available after
|
||||
; two cycles. There are a number of exceptions.
|
||||
|
||||
(define_insn_reservation "ev4_iaddlog" 2
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "iadd,ilog"))
|
||||
"ev4_ib0+ev4_ebox")
|
||||
|
||||
(define_bypass 1
|
||||
"ev4_iaddlog"
|
||||
"ev4_ibr,ev4_iaddlog,ev4_shiftcm,ev4_icmp,ev4_imulsi,ev4_imuldi")
|
||||
|
||||
(define_insn_reservation "ev4_shiftcm" 2
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "shift,icmov"))
|
||||
"ev4_ib0+ev4_ebox")
|
||||
|
||||
(define_insn_reservation "ev4_icmp" 2
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "icmp"))
|
||||
"ev4_ib0+ev4_ebox")
|
||||
|
||||
(define_bypass 1 "ev4_icmp" "ev4_ibr")
|
||||
|
||||
(define_bypass 0
|
||||
"ev4_iaddlog,ev4_shiftcm,ev4_icmp"
|
||||
"ev4_ist"
|
||||
"store_data_bypass_p")
|
||||
|
||||
; Multiplies use a non-piplined imul unit. Also, "no [ebox] insn can
|
||||
; be issued exactly three cycles before an integer multiply completes".
|
||||
|
||||
(define_insn_reservation "ev4_imulsi" 21
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(and (eq_attr "type" "imul")
|
||||
(eq_attr "opsize" "si")))
|
||||
"ev4_ib0+ev4_imul,ev4_imul*18,ev4_ebox")
|
||||
|
||||
(define_bypass 20 "ev4_imulsi" "ev4_ist" "store_data_bypass_p")
|
||||
|
||||
(define_insn_reservation "ev4_imuldi" 23
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(and (eq_attr "type" "imul")
|
||||
(eq_attr "opsize" "!si")))
|
||||
"ev4_ib0+ev4_imul,ev4_imul*20,ev4_ebox")
|
||||
|
||||
(define_bypass 22 "ev4_imuldi" "ev4_ist" "store_data_bypass_p")
|
||||
|
||||
; Most FP insns have a 6 cycle latency, but with a 4 cycle bypass back in.
|
||||
(define_insn_reservation "ev4_fpop" 6
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "fadd,fmul,fcpys,fcmov"))
|
||||
"ev4_ib1+ev4_fbox")
|
||||
|
||||
(define_bypass 4 "ev4_fpop" "ev4_fpop")
|
||||
|
||||
; The floating point divider is not pipelined. Also, "no FPOP insn can be
|
||||
; issued exactly five or exactly six cycles before an fdiv insn completes".
|
||||
|
||||
(define_insn_reservation "ev4_fdivsf" 34
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(and (eq_attr "type" "fdiv")
|
||||
(eq_attr "opsize" "si")))
|
||||
"ev4_ib1+ev4_fdiv,ev4_fdiv*28,ev4_fdiv+ev4_fbox,ev4_fbox")
|
||||
|
||||
(define_insn_reservation "ev4_fdivdf" 63
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(and (eq_attr "type" "fdiv")
|
||||
(eq_attr "opsize" "di")))
|
||||
"ev4_ib1+ev4_fdiv,ev4_fdiv*57,ev4_fdiv+ev4_fbox,ev4_fbox")
|
||||
|
||||
; Traps don't consume or produce data.
|
||||
(define_insn_reservation "ev4_misc" 1
|
||||
(and (eq_attr "cpu" "ev4")
|
||||
(eq_attr "type" "misc"))
|
||||
"ev4_ib1")
|
@ -1,190 +0,0 @@
|
||||
;; Scheduling description for Alpha EV5.
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; This file is part of GCC.
|
||||
;;
|
||||
;; GCC 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.
|
||||
;;
|
||||
;; GCC 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 GCC; see the file COPYING. If not, write to
|
||||
;; the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
;; Boston, MA 02111-1307, USA.
|
||||
|
||||
;; EV5 has two asymetric integer units, E0 and E1, plus separate
|
||||
;; FP add and multiply units.
|
||||
|
||||
(define_automaton "ev5_0,ev5_1")
|
||||
(define_cpu_unit "ev5_e0,ev5_e1,ev5_fa,ev5_fm" "ev5_0")
|
||||
(define_reservation "ev5_e01" "ev5_e0|ev5_e1")
|
||||
(define_reservation "ev5_fam" "ev5_fa|ev5_fm")
|
||||
(define_cpu_unit "ev5_imul" "ev5_0")
|
||||
(define_cpu_unit "ev5_fdiv" "ev5_1")
|
||||
|
||||
; Assume type "multi" single issues.
|
||||
(define_insn_reservation "ev5_multi" 1
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "multi"))
|
||||
"ev5_e0+ev5_e1+ev5_fa+ev5_fm")
|
||||
|
||||
; Stores can only issue to E0, and may not issue with loads.
|
||||
; Model this with some fake units.
|
||||
|
||||
(define_cpu_unit "ev5_l0,ev5_l1,ev5_st" "ev5_0")
|
||||
(define_reservation "ev5_ld" "ev5_l0|ev5_l1")
|
||||
(exclusion_set "ev5_l0,ev5_l1" "ev5_st")
|
||||
|
||||
(define_insn_reservation "ev5_st" 1
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "ist,fst"))
|
||||
"ev5_e0+ev5_st")
|
||||
|
||||
; Loads from L0 complete in two cycles. adjust_cost still factors
|
||||
; in user-specified memory latency, so return 1 here.
|
||||
(define_insn_reservation "ev5_ld" 1
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "ild,fld,ldsym"))
|
||||
"ev5_e01+ev5_ld")
|
||||
|
||||
; Integer branches slot only to E1.
|
||||
(define_insn_reservation "ev5_ibr" 1
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "ibr"))
|
||||
"ev5_e1")
|
||||
|
||||
(define_insn_reservation "ev5_callpal" 1
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "callpal"))
|
||||
"ev5_e1")
|
||||
|
||||
(define_insn_reservation "ev5_jsr" 1
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "jsr"))
|
||||
"ev5_e1")
|
||||
|
||||
(define_insn_reservation "ev5_shift" 1
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "shift"))
|
||||
"ev5_e0")
|
||||
|
||||
(define_insn_reservation "ev5_mvi" 2
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "mvi"))
|
||||
"ev5_e0")
|
||||
|
||||
(define_insn_reservation "ev5_cmov" 2
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "icmov"))
|
||||
"ev5_e01")
|
||||
|
||||
(define_insn_reservation "ev5_iadd" 1
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "iadd"))
|
||||
"ev5_e01")
|
||||
|
||||
(define_insn_reservation "ev5_ilogcmp" 1
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "ilog,icmp"))
|
||||
"ev5_e01")
|
||||
|
||||
; Conditional move and branch can issue the same cycle as the test.
|
||||
(define_bypass 0 "ev5_ilogcmp" "ev5_ibr,ev5_cmov" "if_test_bypass_p")
|
||||
|
||||
; Multiplies use a non-piplined imul unit. Also, "no insn can be issued
|
||||
; to E0 exactly two cycles before an integer multiply completes".
|
||||
|
||||
(define_insn_reservation "ev5_imull" 8
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "type" "imul")
|
||||
(eq_attr "opsize" "si")))
|
||||
"ev5_e0+ev5_imul,ev5_imul*3,nothing,ev5_e0")
|
||||
|
||||
(define_insn_reservation "ev5_imulq" 12
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "type" "imul")
|
||||
(eq_attr "opsize" "di")))
|
||||
"ev5_e0+ev5_imul,ev5_imul*7,nothing,ev5_e0")
|
||||
|
||||
(define_insn_reservation "ev5_imulh" 14
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "type" "imul")
|
||||
(eq_attr "opsize" "udi")))
|
||||
"ev5_e0+ev5_imul,ev5_imul*7,nothing*3,ev5_e0")
|
||||
|
||||
; The multiplier is unable to receive data from Ebox bypass paths. The
|
||||
; instruction issues at the expected time, but its latency is increased
|
||||
; by the time it takes for the input data to become available to the
|
||||
; multiplier. For example, an IMULL instruction issued one cycle later
|
||||
; than an ADDL instruction, which produced one of its operands, has a
|
||||
; latency of 10 (8 + 2). If the IMULL instruction is issued two cycles
|
||||
; later than the ADDL instruction, the latency is 9 (8 + 1).
|
||||
;
|
||||
; Model this instead with increased latency on the input instruction.
|
||||
|
||||
(define_bypass 3
|
||||
"ev5_ld,ev5_shift,ev5_mvi,ev5_cmov,ev5_iadd,ev5_ilogcmp"
|
||||
"ev5_imull,ev5_imulq,ev5_imulh")
|
||||
|
||||
(define_bypass 9 "ev5_imull" "ev5_imull,ev5_imulq,ev5_imulh")
|
||||
(define_bypass 13 "ev5_imulq" "ev5_imull,ev5_imulq,ev5_imulh")
|
||||
(define_bypass 15 "ev5_imulh" "ev5_imull,ev5_imulq,ev5_imulh")
|
||||
|
||||
; Similarly for the FPU we have two asymetric units.
|
||||
|
||||
(define_insn_reservation "ev5_fadd" 4
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "fadd,fcmov"))
|
||||
"ev5_fa")
|
||||
|
||||
(define_insn_reservation "ev5_fbr" 1
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "fbr"))
|
||||
"ev5_fa")
|
||||
|
||||
(define_insn_reservation "ev5_fcpys" 4
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "fcpys"))
|
||||
"ev5_fam")
|
||||
|
||||
(define_insn_reservation "ev5_fmul" 4
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "fmul"))
|
||||
"ev5_fm")
|
||||
|
||||
; The floating point divider is not pipelined. Also, "no insn can be issued
|
||||
; to FA exactly five before an fdiv insn completes".
|
||||
;
|
||||
; ??? Do not model this late reservation due to the enormously increased
|
||||
; size of the resulting DFA.
|
||||
;
|
||||
; ??? Putting ev5_fa and ev5_fdiv alone into the same automata produces
|
||||
; a DFA of acceptable size, but putting ev5_fm and ev5_fa into separate
|
||||
; automata produces incorrect results for insns that can choose one or
|
||||
; the other, i.e. ev5_fcpys.
|
||||
|
||||
(define_insn_reservation "ev5_fdivsf" 15
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "type" "fdiv")
|
||||
(eq_attr "opsize" "si")))
|
||||
; "ev5_fa+ev5_fdiv,ev5_fdiv*9,ev5_fa+ev5_fdiv,ev5_fdiv*4"
|
||||
"ev5_fa+ev5_fdiv,ev5_fdiv*14")
|
||||
|
||||
(define_insn_reservation "ev5_fdivdf" 22
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "type" "fdiv")
|
||||
(eq_attr "opsize" "di")))
|
||||
; "ev5_fa+ev5_fdiv,ev5_fdiv*17,ev5_fa+ev5_fdiv,ev5_fdiv*4"
|
||||
"ev5_fa+ev5_fdiv,ev5_fdiv*21")
|
||||
|
||||
; Traps don't consume or produce data; rpcc is latency 2 if we ever add it.
|
||||
(define_insn_reservation "ev5_misc" 2
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(eq_attr "type" "misc"))
|
||||
"ev5_e0")
|
@ -1,173 +0,0 @@
|
||||
;; Scheduling description for Alpha EV6.
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; This file is part of GCC.
|
||||
;;
|
||||
;; GCC 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.
|
||||
;;
|
||||
;; GCC 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 GCC; see the file COPYING. If not, write to
|
||||
;; the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
;; Boston, MA 02111-1307, USA.
|
||||
|
||||
; EV6 can issue 4 insns per clock. It's out-of-order, so this isn't
|
||||
; expected to help over-much, but a precise description can be important
|
||||
; for software pipelining.
|
||||
;
|
||||
; EV6 has two symmetric pairs ("clusters") of two asymetric integer
|
||||
; units ("upper" and "lower"), yielding pipe names U0, U1, L0, L1.
|
||||
;
|
||||
; ??? The clusters have independent register files that are re-synced
|
||||
; every cycle. Thus there is one additional cycle of latency between
|
||||
; insns issued on different clusters. Possibly model that by duplicating
|
||||
; all EBOX insn_reservations that can issue to either cluster, increasing
|
||||
; all latencies by one, and adding bypasses within the cluster.
|
||||
;
|
||||
; ??? In addition, instruction order affects cluster issue.
|
||||
|
||||
(define_automaton "ev6_0,ev6_1")
|
||||
(define_cpu_unit "ev6_u0,ev6_u1,ev6_l0,ev6_l1" "ev6_0")
|
||||
(define_reservation "ev6_u" "ev6_u0|ev6_u1")
|
||||
(define_reservation "ev6_l" "ev6_l0|ev6_l1")
|
||||
(define_reservation "ev6_ebox" "ev6_u|ev6_l")
|
||||
|
||||
(define_cpu_unit "ev6_fa" "ev6_1")
|
||||
(define_cpu_unit "ev6_fm,ev6_fst0,ev6_fst1" "ev6_0")
|
||||
(define_reservation "ev6_fst" "ev6_fst0|ev6_fst1")
|
||||
|
||||
; Assume type "multi" single issues.
|
||||
(define_insn_reservation "ev6_multi" 1
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "multi"))
|
||||
"ev6_u0+ev6_u1+ev6_l0+ev6_l1+ev6_fa+ev6_fm+ev6_fst0+ev6_fst1")
|
||||
|
||||
; Integer loads take at least 3 clocks, and only issue to lower units.
|
||||
; adjust_cost still factors in user-specified memory latency, so return 1 here.
|
||||
(define_insn_reservation "ev6_ild" 1
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "ild,ldsym"))
|
||||
"ev6_l")
|
||||
|
||||
(define_insn_reservation "ev6_ist" 1
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "ist"))
|
||||
"ev6_l")
|
||||
|
||||
; FP loads take at least 4 clocks. adjust_cost still factors
|
||||
; in user-specified memory latency, so return 2 here.
|
||||
(define_insn_reservation "ev6_fld" 2
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "fld"))
|
||||
"ev6_l")
|
||||
|
||||
; The FPU communicates with memory and the integer register file
|
||||
; via two fp store units. We need a slot in the fst immediately, and
|
||||
; a slot in LOW after the operand data is ready. At which point the
|
||||
; data may be moved either to the store queue or the integer register
|
||||
; file and the insn retired.
|
||||
|
||||
(define_insn_reservation "ev6_fst" 3
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "fst"))
|
||||
"ev6_fst,nothing,ev6_l")
|
||||
|
||||
; Arithmetic goes anywhere.
|
||||
(define_insn_reservation "ev6_arith" 1
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "iadd,ilog,icmp"))
|
||||
"ev6_ebox")
|
||||
|
||||
; Motion video insns also issue only to U0, and take three ticks.
|
||||
(define_insn_reservation "ev6_mvi" 3
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "mvi"))
|
||||
"ev6_u0")
|
||||
|
||||
; Shifts issue to upper units.
|
||||
(define_insn_reservation "ev6_shift" 1
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "shift"))
|
||||
"ev6_u")
|
||||
|
||||
; Multiplies issue only to U1, and all take 7 ticks.
|
||||
(define_insn_reservation "ev6_imul" 7
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "imul"))
|
||||
"ev6_u1")
|
||||
|
||||
; Conditional moves decompose into two independent primitives, each taking
|
||||
; one cycle. Since ev6 is out-of-order, we can't see anything but two cycles.
|
||||
(define_insn_reservation "ev6_icmov" 2
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "icmov"))
|
||||
"ev6_ebox,ev6_ebox")
|
||||
|
||||
; Integer branches issue to upper units
|
||||
(define_insn_reservation "ev6_ibr" 1
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "ibr,callpal"))
|
||||
"ev6_u")
|
||||
|
||||
; Calls only issue to L0.
|
||||
(define_insn_reservation "ev6_jsr" 1
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "jsr"))
|
||||
"ev6_l0")
|
||||
|
||||
; Ftoi/itof only issue to lower pipes.
|
||||
(define_insn_reservation "ev6_itof" 3
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "itof"))
|
||||
"ev6_l")
|
||||
|
||||
(define_insn_reservation "ev6_ftoi" 3
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "ftoi"))
|
||||
"ev6_fst,nothing,ev6_l")
|
||||
|
||||
(define_insn_reservation "ev6_fmul" 4
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "fmul"))
|
||||
"ev6_fm")
|
||||
|
||||
(define_insn_reservation "ev6_fadd" 4
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "fadd,fcpys,fbr"))
|
||||
"ev6_fa")
|
||||
|
||||
(define_insn_reservation "ev6_fcmov" 8
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(eq_attr "type" "fcmov"))
|
||||
"ev6_fa,nothing*3,ev6_fa")
|
||||
|
||||
(define_insn_reservation "ev6_fdivsf" 12
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(and (eq_attr "type" "fdiv")
|
||||
(eq_attr "opsize" "si")))
|
||||
"ev6_fa*9")
|
||||
|
||||
(define_insn_reservation "ev6_fdivdf" 15
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(and (eq_attr "type" "fdiv")
|
||||
(eq_attr "opsize" "di")))
|
||||
"ev6_fa*12")
|
||||
|
||||
(define_insn_reservation "ev6_sqrtsf" 18
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(and (eq_attr "type" "fsqrt")
|
||||
(eq_attr "opsize" "si")))
|
||||
"ev6_fa*15")
|
||||
|
||||
(define_insn_reservation "ev6_sqrtdf" 33
|
||||
(and (eq_attr "cpu" "ev6")
|
||||
(and (eq_attr "type" "fsqrt")
|
||||
(eq_attr "opsize" "di")))
|
||||
"ev6_fa*30")
|
@ -1,96 +0,0 @@
|
||||
/* Definitions for DEC Alpha/AXP running FreeBSD using the ELF format
|
||||
Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
|
||||
Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }
|
||||
|
||||
/* Provide a FBSD_TARGET_CPU_CPP_BUILTINS and CPP_SPEC appropriate for
|
||||
FreeBSD/alpha. Besides the dealing with
|
||||
the GCC option `-posix', and PIC issues as on all FreeBSD platforms, we must
|
||||
deal with the Alpha's FP issues. */
|
||||
|
||||
#undef FBSD_TARGET_CPU_CPP_BUILTINS
|
||||
#define FBSD_TARGET_CPU_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
if (flag_pic) \
|
||||
{ \
|
||||
builtin_define ("__PIC__"); \
|
||||
builtin_define ("__pic__"); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%(cpp_subtarget) %{posix:-D_POSIX_SOURCE}"
|
||||
|
||||
#define LINK_SPEC "%{G*} %{relax:-relax} \
|
||||
%{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
|
||||
%{Wl,*:%*} \
|
||||
%{assert*} %{R*} %{rpath*} %{defsym*} \
|
||||
%{shared:-Bshareable %{h*} %{soname*}} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
|
||||
%{static:-Bstatic}} \
|
||||
%{symbolic:-Bsymbolic}"
|
||||
|
||||
|
||||
/************************[ Target stuff ]***********************************/
|
||||
|
||||
/* Define the actual types of some ANSI-mandated types.
|
||||
Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.c,
|
||||
c-common.c, and config/<arch>/<arch>.h. */
|
||||
|
||||
/* alpha.h gets this wrong for FreeBSD. We use the GCC defaults instead. */
|
||||
#undef WCHAR_TYPE
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (FreeBSD/alpha ELF)");
|
||||
|
||||
#define TARGET_ELF 1
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
|
||||
|
||||
#undef HAS_INIT_SECTION
|
||||
|
||||
/* Show that we need a GP when profiling. */
|
||||
#undef TARGET_PROFILING_NEEDS_GP
|
||||
#define TARGET_PROFILING_NEEDS_GP 1
|
||||
|
||||
/* This is the char to use for continuation (in case we need to turn
|
||||
continuation back on). */
|
||||
|
||||
#undef DBX_CONTIN_CHAR
|
||||
#define DBX_CONTIN_CHAR '?'
|
||||
|
||||
/* Don't default to pcc-struct-return, we want to retain compatibility with
|
||||
older FreeBSD releases AND pcc-struct-return may not be reentrant. */
|
||||
|
||||
#undef DEFAULT_PCC_STRUCT_RETURN
|
||||
#define DEFAULT_PCC_STRUCT_RETURN 0
|
@ -1,26 +0,0 @@
|
||||
/* Configuration for an Alpha running GNU with ELF as the target machine. */
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (Alpha GNU)");
|
||||
|
||||
#undef TARGET_OS_CPP_BUILTINS /* config.gcc includes alpha/linux.h. */
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
HURD_TARGET_OS_CPP_BUILTINS(); \
|
||||
builtin_define ("_LONGLONG"); \
|
||||
} while (0)
|
||||
|
||||
#undef ELF_DYNAMIC_LINKER
|
||||
#define ELF_DYNAMIC_LINKER "/lib/ld.so"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!shared: \
|
||||
%{!static: \
|
||||
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
|
||||
%{static:crt0.o%s}} \
|
||||
crti.o%s \
|
||||
%{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
|
||||
|
||||
/* FIXME: Is a Hurd-specific fallback mechanism necessary? */
|
||||
#undef MD_FALLBACK_FRAME_STATE_FOR
|
@ -1,320 +0,0 @@
|
||||
/* DEC Alpha division and remainder support.
|
||||
Copyright (C) 1994, 1999 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 into combinations with other programs,
|
||||
and to distribute those combinations 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 a combine
|
||||
executable.)
|
||||
|
||||
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. */
|
||||
|
||||
/* This had to be written in assembler because the division functions
|
||||
use a non-standard calling convention.
|
||||
|
||||
This file provides an implementation of __divqu, __divq, __divlu,
|
||||
__divl, __remqu, __remq, __remlu and __reml. CPP macros control
|
||||
the exact operation.
|
||||
|
||||
Operation performed: $27 := $24 o $25, clobber $28, return address to
|
||||
caller in $23, where o one of the operations.
|
||||
|
||||
The following macros need to be defined:
|
||||
|
||||
SIZE, the number of bits, 32 or 64.
|
||||
|
||||
TYPE, either UNSIGNED or SIGNED
|
||||
|
||||
OPERATION, either DIVISION or REMAINDER
|
||||
|
||||
SPECIAL_CALLING_CONVENTION, 0 or 1. It is useful for debugging to
|
||||
define this to 0. That removes the `__' prefix to make the function
|
||||
name not collide with the existing libc.a names, and uses the
|
||||
standard Alpha procedure calling convention.
|
||||
*/
|
||||
|
||||
#ifndef SPECIAL_CALLING_CONVENTION
|
||||
#define SPECIAL_CALLING_CONVENTION 1
|
||||
#endif
|
||||
|
||||
#ifdef L_divl
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
#define FUNCTION_NAME __divl
|
||||
#else
|
||||
#define FUNCTION_NAME divl
|
||||
#endif
|
||||
#define SIZE 32
|
||||
#define TYPE SIGNED
|
||||
#define OPERATION DIVISION
|
||||
#endif
|
||||
|
||||
#ifdef L_divlu
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
#define FUNCTION_NAME __divlu
|
||||
#else
|
||||
#define FUNCTION_NAME divlu
|
||||
#endif
|
||||
#define SIZE 32
|
||||
#define TYPE UNSIGNED
|
||||
#define OPERATION DIVISION
|
||||
#endif
|
||||
|
||||
#ifdef L_divq
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
#define FUNCTION_NAME __divq
|
||||
#else
|
||||
#define FUNCTION_NAME divq
|
||||
#endif
|
||||
#define SIZE 64
|
||||
#define TYPE SIGNED
|
||||
#define OPERATION DIVISION
|
||||
#endif
|
||||
|
||||
#ifdef L_divqu
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
#define FUNCTION_NAME __divqu
|
||||
#else
|
||||
#define FUNCTION_NAME divqu
|
||||
#endif
|
||||
#define SIZE 64
|
||||
#define TYPE UNSIGNED
|
||||
#define OPERATION DIVISION
|
||||
#endif
|
||||
|
||||
#ifdef L_reml
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
#define FUNCTION_NAME __reml
|
||||
#else
|
||||
#define FUNCTION_NAME reml
|
||||
#endif
|
||||
#define SIZE 32
|
||||
#define TYPE SIGNED
|
||||
#define OPERATION REMAINDER
|
||||
#endif
|
||||
|
||||
#ifdef L_remlu
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
#define FUNCTION_NAME __remlu
|
||||
#else
|
||||
#define FUNCTION_NAME remlu
|
||||
#endif
|
||||
#define SIZE 32
|
||||
#define TYPE UNSIGNED
|
||||
#define OPERATION REMAINDER
|
||||
#endif
|
||||
|
||||
#ifdef L_remq
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
#define FUNCTION_NAME __remq
|
||||
#else
|
||||
#define FUNCTION_NAME remq
|
||||
#endif
|
||||
#define SIZE 64
|
||||
#define TYPE SIGNED
|
||||
#define OPERATION REMAINDER
|
||||
#endif
|
||||
|
||||
#ifdef L_remqu
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
#define FUNCTION_NAME __remqu
|
||||
#else
|
||||
#define FUNCTION_NAME remqu
|
||||
#endif
|
||||
#define SIZE 64
|
||||
#define TYPE UNSIGNED
|
||||
#define OPERATION REMAINDER
|
||||
#endif
|
||||
|
||||
#define tmp0 $3
|
||||
#define tmp1 $28
|
||||
#define cnt $1
|
||||
#define result_sign $2
|
||||
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
#define N $24
|
||||
#define D $25
|
||||
#define Q RETREG
|
||||
#define RETREG $27
|
||||
#else
|
||||
#define N $16
|
||||
#define D $17
|
||||
#define Q RETREG
|
||||
#define RETREG $0
|
||||
#endif
|
||||
|
||||
/* Misc symbols to make alpha assembler easier to read. */
|
||||
#define zero $31
|
||||
#define sp $30
|
||||
|
||||
/* Symbols to make interface nicer. */
|
||||
#define UNSIGNED 0
|
||||
#define SIGNED 1
|
||||
#define DIVISION 0
|
||||
#define REMAINDER 1
|
||||
|
||||
.set noreorder
|
||||
.set noat
|
||||
.text
|
||||
.align 3
|
||||
.globl FUNCTION_NAME
|
||||
.ent FUNCTION_NAME
|
||||
FUNCTION_NAME:
|
||||
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
|
||||
/* Under the special calling convention, we have to preserve all register
|
||||
values but $23 and $28. */
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
lda sp,-64(sp)
|
||||
#if OPERATION == DIVISION
|
||||
stq N,0(sp)
|
||||
#endif
|
||||
stq D,8(sp)
|
||||
stq cnt,16(sp)
|
||||
stq result_sign,24(sp)
|
||||
stq tmp0,32(sp)
|
||||
#endif
|
||||
|
||||
/* If we are computing the remainder, move N to the register that is used
|
||||
for the return value, and redefine what register is used for N. */
|
||||
#if OPERATION == REMAINDER
|
||||
bis N,N,RETREG
|
||||
#undef N
|
||||
#define N RETREG
|
||||
#endif
|
||||
|
||||
/* Perform conversion from 32 bit types to 64 bit types. */
|
||||
#if SIZE == 32
|
||||
#if TYPE == SIGNED
|
||||
/* If there are problems with the signed case, add these instructions.
|
||||
The caller should already have done this.
|
||||
addl N,0,N # sign extend N
|
||||
addl D,0,D # sign extend D
|
||||
*/
|
||||
#else /* UNSIGNED */
|
||||
zap N,0xf0,N # zero extend N (caller required to sign extend)
|
||||
zap D,0xf0,D # zero extend D
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Check for divide by zero. */
|
||||
bne D,$34
|
||||
lda $16,-2(zero)
|
||||
call_pal 0xaa
|
||||
$34:
|
||||
|
||||
#if TYPE == SIGNED
|
||||
#if OPERATION == DIVISION
|
||||
xor N,D,result_sign
|
||||
#else
|
||||
bis N,N,result_sign
|
||||
#endif
|
||||
/* Get the absolute values of N and D. */
|
||||
subq zero,N,tmp0
|
||||
cmovlt N,tmp0,N
|
||||
subq zero,D,tmp0
|
||||
cmovlt D,tmp0,D
|
||||
#endif
|
||||
|
||||
/* Compute CNT = ceil(log2(N)) - ceil(log2(D)). This is the number of
|
||||
divide iterations we will have to perform. Should you wish to optimize
|
||||
this, check a few bits at a time, preferably using zap/zapnot. Be
|
||||
careful though, this code runs fast fro the most common cases, when the
|
||||
quotient is small. */
|
||||
bge N,$35
|
||||
bis zero,1,cnt
|
||||
blt D,$40
|
||||
.align 3
|
||||
$39: addq D,D,D
|
||||
addl cnt,1,cnt
|
||||
bge D,$39
|
||||
br zero,$40
|
||||
$35: cmpult N,D,tmp0
|
||||
bis zero,zero,cnt
|
||||
bne tmp0,$42
|
||||
.align 3
|
||||
$44: addq D,D,D
|
||||
cmpult N,D,tmp0
|
||||
addl cnt,1,cnt
|
||||
beq tmp0,$44
|
||||
$42: srl D,1,D
|
||||
$40:
|
||||
subl cnt,1,cnt
|
||||
|
||||
|
||||
/* Actual divide. Could be optimized with unrolling. */
|
||||
#if OPERATION == DIVISION
|
||||
bis zero,zero,Q
|
||||
#endif
|
||||
blt cnt,$46
|
||||
.align 3
|
||||
$49: cmpule D,N,tmp1
|
||||
subq N,D,tmp0
|
||||
srl D,1,D
|
||||
subl cnt,1,cnt
|
||||
cmovne tmp1,tmp0,N
|
||||
#if OPERATION == DIVISION
|
||||
addq Q,Q,Q
|
||||
bis Q,tmp1,Q
|
||||
#endif
|
||||
bge cnt,$49
|
||||
$46:
|
||||
|
||||
|
||||
/* The result is now in RETREG. NOTE! It was written to RETREG using
|
||||
either N or Q as a synonym! */
|
||||
|
||||
|
||||
/* Change the sign of the result as needed. */
|
||||
#if TYPE == SIGNED
|
||||
subq zero,RETREG,tmp0
|
||||
cmovlt result_sign,tmp0,RETREG
|
||||
#endif
|
||||
|
||||
|
||||
/* Restore clobbered registers. */
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
#if OPERATION == DIVISION
|
||||
ldq N,0(sp)
|
||||
#endif
|
||||
ldq D,8(sp)
|
||||
ldq cnt,16(sp)
|
||||
ldq result_sign,24(sp)
|
||||
ldq tmp0,32(sp)
|
||||
|
||||
lda sp,64(sp)
|
||||
#endif
|
||||
|
||||
|
||||
/* Sign extend an *unsigned* 32 bit result, as required by the Alpha
|
||||
conventions. */
|
||||
#if TYPE == UNSIGNED && SIZE == 32
|
||||
/* This could be avoided by adding some CPP hair to the divide loop.
|
||||
It is probably not worth the added complexity. */
|
||||
addl RETREG,0,RETREG
|
||||
#endif
|
||||
|
||||
|
||||
#if SPECIAL_CALLING_CONVENTION
|
||||
ret zero,($23),1
|
||||
#else
|
||||
ret zero,($26),1
|
||||
#endif
|
||||
.end FUNCTION_NAME
|
@ -1,45 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler
|
||||
for Alpha Linux-based GNU systems using ELF.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (Alpha GNU/Linux for ELF)");
|
||||
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
|
||||
|
||||
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
|
||||
%{O*:-O3} %{!O*:-O1} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker %(elf_dynamic_linker)}} \
|
||||
%{static:-static}}"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC \
|
||||
"%{pthread:-lpthread} %{shared:-lc}%{!shared:%{profile:-lc_p}%{!profile:-lc}} "
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
@ -1,124 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler,
|
||||
for Alpha Linux-based GNU systems.
|
||||
Copyright (C) 1996, 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
builtin_define ("__gnu_linux__"); \
|
||||
builtin_define ("_LONGLONG"); \
|
||||
builtin_define_std ("linux"); \
|
||||
builtin_define_std ("unix"); \
|
||||
builtin_assert ("system=linux"); \
|
||||
builtin_assert ("system=unix"); \
|
||||
builtin_assert ("system=posix"); \
|
||||
/* The GNU C++ standard library requires this. */ \
|
||||
if (c_dialect_cxx ()) \
|
||||
builtin_define ("_GNU_SOURCE"); \
|
||||
} while (0)
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC \
|
||||
"%{pthread:-lpthread} \
|
||||
%{shared:-lc} \
|
||||
%{!shared: %{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
/* Show that we need a GP when profiling. */
|
||||
#undef TARGET_PROFILING_NEEDS_GP
|
||||
#define TARGET_PROFILING_NEEDS_GP 1
|
||||
|
||||
/* Don't care about faults in the prologue. */
|
||||
#undef TARGET_CAN_FAULT_IN_PROLOGUE
|
||||
#define TARGET_CAN_FAULT_IN_PROLOGUE 1
|
||||
|
||||
/* OS fixes up EV5 data fault on prefetch. */
|
||||
#undef TARGET_FIXUP_EV5_PREFETCH
|
||||
#define TARGET_FIXUP_EV5_PREFETCH 1
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
/* Define this so that all GNU/Linux targets handle the same pragmas. */
|
||||
#define HANDLE_PRAGMA_PACK_PUSH_POP
|
||||
|
||||
/* Determine whether the the entire c99 runtime is present in the
|
||||
runtime library. */
|
||||
#define TARGET_C99_FUNCTIONS 1
|
||||
|
||||
#define TARGET_HAS_F_SETLKW
|
||||
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
||||
|
||||
/* Do code reading to identify a signal frame, and set the frame
|
||||
state data appropriately. See unwind-dw2.c for the structs. */
|
||||
|
||||
#ifdef IN_LIBGCC2
|
||||
#include <signal.h>
|
||||
#include <sys/ucontext.h>
|
||||
#endif
|
||||
|
||||
#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \
|
||||
do { \
|
||||
unsigned int *pc_ = (CONTEXT)->ra; \
|
||||
struct sigcontext *sc_; \
|
||||
long new_cfa_, i_; \
|
||||
\
|
||||
if (pc_[0] != 0x47fe0410 /* mov $30,$16 */ \
|
||||
|| pc_[2] != 0x00000083 /* callsys */) \
|
||||
break; \
|
||||
if ((CONTEXT)->cfa == 0) \
|
||||
break; \
|
||||
if (pc_[1] == 0x201f0067) /* lda $0,NR_sigreturn */ \
|
||||
sc_ = (CONTEXT)->cfa; \
|
||||
else if (pc_[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */ \
|
||||
{ \
|
||||
struct rt_sigframe { \
|
||||
struct siginfo info; \
|
||||
struct ucontext uc; \
|
||||
} *rt_ = (CONTEXT)->cfa; \
|
||||
sc_ = &rt_->uc.uc_mcontext; \
|
||||
} \
|
||||
else \
|
||||
break; \
|
||||
new_cfa_ = sc_->sc_regs[30]; \
|
||||
(FS)->cfa_how = CFA_REG_OFFSET; \
|
||||
(FS)->cfa_reg = 30; \
|
||||
(FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa; \
|
||||
for (i_ = 0; i_ < 30; ++i_) \
|
||||
{ \
|
||||
(FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \
|
||||
(FS)->regs.reg[i_].loc.offset \
|
||||
= (long)&sc_->sc_regs[i_] - new_cfa_; \
|
||||
} \
|
||||
for (i_ = 0; i_ < 31; ++i_) \
|
||||
{ \
|
||||
(FS)->regs.reg[i_+32].how = REG_SAVED_OFFSET; \
|
||||
(FS)->regs.reg[i_+32].loc.offset \
|
||||
= (long)&sc_->sc_fpregs[i_] - new_cfa_; \
|
||||
} \
|
||||
(FS)->regs.reg[64].how = REG_SAVED_OFFSET; \
|
||||
(FS)->regs.reg[64].loc.offset = (long)&sc_->sc_pc - new_cfa_; \
|
||||
(FS)->retaddr_column = 64; \
|
||||
goto SUCCESS; \
|
||||
} while (0)
|
@ -1,83 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler,
|
||||
for Alpha NetBSD systems.
|
||||
Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
NETBSD_OS_CPP_BUILTINS_ELF(); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* NetBSD doesn't use the LANGUAGE* built-ins. */
|
||||
#undef SUBTARGET_LANGUAGE_CPP_BUILTINS
|
||||
#define SUBTARGET_LANGUAGE_CPP_BUILTINS() /* nothing */
|
||||
|
||||
|
||||
/* Show that we need a GP when profiling. */
|
||||
#undef TARGET_PROFILING_NEEDS_GP
|
||||
#define TARGET_PROFILING_NEEDS_GP 1
|
||||
|
||||
|
||||
/* Provide a CPP_SUBTARGET_SPEC appropriate for NetBSD/alpha. We use
|
||||
this to pull in CPP specs that all NetBSD configurations need. */
|
||||
|
||||
#undef CPP_SUBTARGET_SPEC
|
||||
#define CPP_SUBTARGET_SPEC NETBSD_CPP_SPEC
|
||||
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \
|
||||
{ "netbsd_entry_point", NETBSD_ENTRY_POINT }, \
|
||||
{ "netbsd_endfile_spec", NETBSD_ENDFILE_SPEC },
|
||||
|
||||
|
||||
/* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF target. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{G*} %{relax:-relax} \
|
||||
%{O*:-O3} %{!O*:-O1} \
|
||||
%(netbsd_link_spec)"
|
||||
|
||||
#define NETBSD_ENTRY_POINT "__start"
|
||||
|
||||
|
||||
/* Provide an ENDFILE_SPEC appropriate for NetBSD/alpha ELF. Here we
|
||||
add crtend.o, which provides part of the support for getting
|
||||
C++ file-scope static objects deconstructed after exiting "main".
|
||||
|
||||
We also need to handle the GCC option `-ffast-math'. */
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC \
|
||||
"%{ffast-math|funsafe-math-optimizations:crtfm%O%s} \
|
||||
%(netbsd_endfile_spec)"
|
||||
|
||||
|
||||
/* Attempt to enable execute permissions on the stack. */
|
||||
|
||||
#define ENABLE_EXECUTE_STACK NETBSD_ENABLE_EXECUTE_STACK
|
||||
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (NetBSD/alpha ELF)");
|
@ -1,99 +0,0 @@
|
||||
/* Configuration file for an alpha OpenBSD target.
|
||||
Copyright (C) 1999, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* We settle for little endian for now. */
|
||||
#define TARGET_ENDIAN_DEFAULT 0
|
||||
|
||||
/* Controlling the compilation driver. */
|
||||
|
||||
/* alpha needs __start. */
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp %{assert*}"
|
||||
|
||||
/* run-time target specifications */
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
builtin_define ("__OpenBSD__"); \
|
||||
builtin_define ("__ANSI_COMPAT"); \
|
||||
builtin_define ("__unix__"); \
|
||||
builtin_assert ("system=unix"); \
|
||||
} while (0)
|
||||
|
||||
/* Layout of source language data types. */
|
||||
|
||||
/* This must agree with <machine/ansi.h> */
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "long unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE "long int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
|
||||
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||
|
||||
#define LOCAL_LABEL_PREFIX "."
|
||||
|
||||
/* We don't have an init section yet. */
|
||||
#undef HAS_INIT_SECTION
|
||||
|
||||
/* collect2 support (assembler format: macros for initialization). */
|
||||
|
||||
/* Don't tell collect2 we use COFF as we don't have (yet ?) a dynamic ld
|
||||
library with the proper functions to handle this -> collect2 will
|
||||
default to using nm. */
|
||||
#undef OBJECT_FORMAT_COFF
|
||||
#undef EXTENDED_COFF
|
||||
|
||||
/* Assembler format: exception region output. */
|
||||
|
||||
/* All configurations that don't use elf must be explicit about not using
|
||||
dwarf unwind information. */
|
||||
#ifdef INCOMING_RETURN_ADDR_RTX
|
||||
#undef DWARF2_UNWIND_INFO
|
||||
#define DWARF2_UNWIND_INFO 0
|
||||
#endif
|
||||
|
||||
/* Assembler format: label output. */
|
||||
|
||||
/* alpha ecoff supports only weak aliases. */
|
||||
#undef ASM_WEAKEN_LABEL
|
||||
#define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS (FILE,NAME,0)
|
||||
|
||||
#define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \
|
||||
do { \
|
||||
fputs ("\t.weakext\t", FILE); \
|
||||
assemble_name (FILE, NAME); \
|
||||
if (VALUE) \
|
||||
{ \
|
||||
fputs (" , ", FILE); \
|
||||
assemble_name (FILE, VALUE); \
|
||||
} \
|
||||
fputc ('\n', FILE); \
|
||||
} while (0)
|
||||
|
||||
|
@ -1,214 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler, for DEC Alpha on OSF/1.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003,
|
||||
2004 Free Software Foundation, Inc.
|
||||
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* As of OSF 4.0, as can subtract adjacent labels. */
|
||||
|
||||
#undef TARGET_AS_CAN_SUBTRACT_LABELS
|
||||
#define TARGET_AS_CAN_SUBTRACT_LABELS 1
|
||||
|
||||
/* The GEM libraries for X_float are present, though not used by C. */
|
||||
|
||||
#undef TARGET_HAS_XFLOATING_LIBS
|
||||
#define TARGET_HAS_XFLOATING_LIBS 1
|
||||
|
||||
/* Names to predefine in the preprocessor for this target machine. */
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
builtin_define_std ("unix"); \
|
||||
builtin_define_std ("SYSTYPE_BSD"); \
|
||||
builtin_define ("_SYSTYPE_BSD"); \
|
||||
builtin_define ("__osf__"); \
|
||||
builtin_define ("__digital__"); \
|
||||
builtin_define ("__arch64__"); \
|
||||
builtin_define ("_LONGLONG"); \
|
||||
builtin_define ("__PRAGMA_EXTERN_PREFIX"); \
|
||||
builtin_assert ("system=unix"); \
|
||||
builtin_assert ("system=xpg4"); \
|
||||
/* Tru64 UNIX V5 has a 16 byte long \
|
||||
double type and requires __X_FLOAT \
|
||||
to be defined for <math.h>. */ \
|
||||
if (LONG_DOUBLE_TYPE_SIZE == 128) \
|
||||
builtin_define ("__X_FLOAT"); \
|
||||
\
|
||||
/* Tru64 UNIX V4/V5 provide several ISO C94 \
|
||||
features protected by the corresponding \
|
||||
__STDC_VERSION__ macro. libstdc++ v3 \
|
||||
needs them as well. */ \
|
||||
if (c_dialect_cxx ()) \
|
||||
builtin_define ("__STDC_VERSION__=199409L"); \
|
||||
} while (0)
|
||||
|
||||
/* Accept DEC C flags for multithreaded programs. We use _PTHREAD_USE_D4
|
||||
instead of PTHREAD_USE_D4 since both have the same effect and the former
|
||||
doesn't invade the users' namespace. */
|
||||
|
||||
#undef CPP_SUBTARGET_SPEC
|
||||
#define CPP_SUBTARGET_SPEC \
|
||||
"%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}"
|
||||
|
||||
/* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */
|
||||
|
||||
#define LIB_SPEC \
|
||||
"%{p|pg:-lprof1%{pthread|threads:_r} -lpdf} %{a:-lprof2} \
|
||||
%{threads: -lpthreads} %{pthread|threads: -lpthread -lmach -lexc} -lc"
|
||||
|
||||
/* Pass "-G 8" to ld because Alpha's CC does. Pass -O3 if we are
|
||||
optimizing, -O1 if we are not. Pass -S to silence `weak symbol
|
||||
multiply defined' warnings. Pass -shared, -non_shared or
|
||||
-call_shared as appropriate. Pass -hidden_symbol so that our
|
||||
constructor and call-frame data structures are not accidentally
|
||||
overridden. */
|
||||
#define LINK_SPEC \
|
||||
"-G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \
|
||||
%{!static:%{shared:-shared -hidden_symbol _GLOBAL_*} \
|
||||
%{!shared:-call_shared}} %{pg} %{taso} %{rpath*}"
|
||||
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}"
|
||||
|
||||
#define ENDFILE_SPEC \
|
||||
"%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
|
||||
|
||||
#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/"
|
||||
|
||||
/* Tru64 UNIX V5.1 requires a special as flag. Empty by default. */
|
||||
|
||||
#define ASM_OLDAS_SPEC ""
|
||||
|
||||
/* In OSF/1 v3.2c, the assembler by default does not output file names which
|
||||
causes mips-tfile to fail. Passing -g to the assembler fixes this problem.
|
||||
??? Strictly speaking, we need -g only if the user specifies -g. Passing
|
||||
it always means that we get slightly larger than necessary object files
|
||||
if the user does not specify -g. If we don't pass -g, then mips-tfile
|
||||
will need to be fixed to work in this case. Pass -O0 since some
|
||||
optimization are broken and don't help us anyway. Pass -nocpp because
|
||||
there's no point in running CPP on our assembler output. */
|
||||
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0
|
||||
#define ASM_SPEC "%{malpha-as:-g %(asm_oldas) -nocpp %{pg} -O0}"
|
||||
#else
|
||||
#define ASM_SPEC "%{!mgas:-g %(asm_oldas) -nocpp %{pg} -O0}"
|
||||
#endif
|
||||
|
||||
/* Specify to run a post-processor, mips-tfile after the assembler
|
||||
has run to stuff the ecoff debug information into the object file.
|
||||
This is needed because the Alpha assembler provides no way
|
||||
of specifying such information in the assembly file. */
|
||||
|
||||
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0
|
||||
|
||||
#define ASM_FINAL_SPEC "\
|
||||
%{malpha-as: %{!mno-mips-tfile: \
|
||||
\n mips-tfile %{v*: -v} \
|
||||
%{K: -I %b.o~} \
|
||||
%{!K: %{save-temps: -I %b.o~}} \
|
||||
%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \
|
||||
%{.s:%i} %{!.s:%g.s}}}"
|
||||
|
||||
#else
|
||||
#define ASM_FINAL_SPEC "\
|
||||
%{!mgas: %{!mno-mips-tfile: \
|
||||
\n mips-tfile %{v*: -v} \
|
||||
%{K: -I %b.o~} \
|
||||
%{!K: %{save-temps: -I %b.o~}} \
|
||||
%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \
|
||||
%{.s:%i} %{!.s:%g.s}}}"
|
||||
|
||||
#endif
|
||||
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS { "asm_oldas", ASM_OLDAS_SPEC }
|
||||
|
||||
/* Indicate that we have a stamp.h to use. */
|
||||
#ifndef CROSS_COMPILE
|
||||
#define HAVE_STAMP_H 1
|
||||
#endif
|
||||
|
||||
/* Attempt to turn on access permissions for the stack. */
|
||||
|
||||
#define ENABLE_EXECUTE_STACK \
|
||||
void \
|
||||
__enable_execute_stack (void *addr) \
|
||||
{ \
|
||||
extern int mprotect (const void *, size_t, int); \
|
||||
long size = getpagesize (); \
|
||||
long mask = ~(size-1); \
|
||||
char *page = (char *) (((long) addr) & mask); \
|
||||
char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \
|
||||
\
|
||||
/* 7 is PROT_READ | PROT_WRITE | PROT_EXEC */ \
|
||||
if (mprotect (page, end - page, 7) < 0) \
|
||||
perror ("mprotect of trampoline code"); \
|
||||
}
|
||||
|
||||
/* Digital UNIX V4.0E (1091)/usr/include/sys/types.h 4.3.49.9 1997/08/14 */
|
||||
#define SIZE_TYPE "long unsigned int"
|
||||
#define PTRDIFF_TYPE "long int"
|
||||
|
||||
/* The linker will stick __main into the .init section. */
|
||||
#define HAS_INIT_SECTION
|
||||
#define LD_INIT_SWITCH "-init"
|
||||
#define LD_FINI_SWITCH "-fini"
|
||||
|
||||
/* The linker needs a space after "-o". This allows -oldstyle_liblookup to
|
||||
be passed to ld. */
|
||||
#define SWITCHES_NEED_SPACES "o"
|
||||
|
||||
/* Select a format to encode pointers in exception handling data. CODE
|
||||
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
|
||||
true if the symbol may be affected by dynamic relocations.
|
||||
|
||||
We really ought to be using the SREL32 relocations that ECOFF has,
|
||||
but no version of the native assembler supports creating such things,
|
||||
and Compaq has no plans to rectify this. Worse, the dynamic loader
|
||||
cannot handle unaligned relocations, so we have to make sure that
|
||||
things get padded appropriately. */
|
||||
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
|
||||
(TARGET_GAS \
|
||||
? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
|
||||
: DW_EH_PE_aligned)
|
||||
|
||||
/* This is how we tell the assembler that a symbol is weak. */
|
||||
|
||||
#define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \
|
||||
do \
|
||||
{ \
|
||||
(*targetm.asm_out.globalize_label) (FILE, NAME); \
|
||||
fputs ("\t.weakext\t", FILE); \
|
||||
assemble_name (FILE, NAME); \
|
||||
if (VALUE) \
|
||||
{ \
|
||||
fputc (' ', FILE); \
|
||||
assemble_name (FILE, VALUE); \
|
||||
} \
|
||||
fputc ('\n', FILE); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define ASM_WEAKEN_LABEL(FILE, NAME) ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, 0)
|
||||
|
||||
/* Handle #pragma weak and #pragma pack. */
|
||||
#define HANDLE_SYSV_PRAGMA 1
|
||||
|
||||
/* Handle #pragma extern_prefix. Technically only needed for Tru64 5.x,
|
||||
but easier to manipulate preprocessor bits from here. */
|
||||
#define HANDLE_PRAGMA_EXTERN_PREFIX 1
|
@ -1,53 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler, for DEC Alpha on Tru64 5.
|
||||
Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Tru64 5.1 uses IEEE QUAD format. */
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT MASK_FP | MASK_FPREGS | MASK_LONG_DOUBLE_128
|
||||
|
||||
/* In Tru64 UNIX V5.1, Compaq introduced a new assembler
|
||||
(/usr/lib/cmplrs/cc/adu) which currently (versions between 3.04.29 and
|
||||
3.04.32) breaks mips-tfile. Passing the undocumented -oldas flag reverts
|
||||
to using the old assembler (/usr/lib/cmplrs/cc/as[01]).
|
||||
|
||||
The V5.0 and V5.0A assemblers silently ignore -oldas, so it can be
|
||||
specified here.
|
||||
|
||||
It is clearly not desirable to depend on this undocumented flag, and
|
||||
Compaq wants -oldas to go away soon, but until they have released a
|
||||
new adu that works with mips-tfile, this is the only option.
|
||||
|
||||
In some versions of the DTK, the assembler driver invokes ld after
|
||||
assembly. This has been fixed in current versions, but adding -c
|
||||
works as expected for all versions. */
|
||||
|
||||
#undef ASM_OLDAS_SPEC
|
||||
#define ASM_OLDAS_SPEC "-oldas -c"
|
||||
|
||||
/* The linker appears to perform invalid code optimizations that result
|
||||
in the ldgp emitted for the exception_receiver pattern being incorrectly
|
||||
linked. */
|
||||
#undef TARGET_LD_BUGGY_LDGP
|
||||
#define TARGET_LD_BUGGY_LDGP 1
|
||||
|
||||
/* Tru64 v5.1 has the float and long double forms of math functions. */
|
||||
#undef TARGET_C99_FUNCTIONS
|
||||
#define TARGET_C99_FUNCTIONS 1
|
||||
|
@ -1,167 +0,0 @@
|
||||
# Alpha 21064 __udiv_qrnnd
|
||||
# Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# This file is part of GCC.
|
||||
|
||||
# The GNU MP Library 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 of the License, 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 Library General Public
|
||||
# License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GCC; see the file COPYING. If not, write to the
|
||||
# Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
# MA 02111-1307, USA.
|
||||
|
||||
#ifdef __ELF__
|
||||
.section .note.GNU-stack,""
|
||||
#endif
|
||||
|
||||
.set noreorder
|
||||
.set noat
|
||||
|
||||
.text
|
||||
|
||||
.globl __udiv_qrnnd
|
||||
.ent __udiv_qrnnd
|
||||
__udiv_qrnnd:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
|
||||
#define cnt $2
|
||||
#define tmp $3
|
||||
#define rem_ptr $16
|
||||
#define n1 $17
|
||||
#define n0 $18
|
||||
#define d $19
|
||||
#define qb $20
|
||||
#define AT $at
|
||||
|
||||
ldiq cnt,16
|
||||
blt d,$largedivisor
|
||||
|
||||
$loop1: cmplt n0,0,tmp
|
||||
addq n1,n1,n1
|
||||
bis n1,tmp,n1
|
||||
addq n0,n0,n0
|
||||
cmpule d,n1,qb
|
||||
subq n1,d,tmp
|
||||
cmovne qb,tmp,n1
|
||||
bis n0,qb,n0
|
||||
cmplt n0,0,tmp
|
||||
addq n1,n1,n1
|
||||
bis n1,tmp,n1
|
||||
addq n0,n0,n0
|
||||
cmpule d,n1,qb
|
||||
subq n1,d,tmp
|
||||
cmovne qb,tmp,n1
|
||||
bis n0,qb,n0
|
||||
cmplt n0,0,tmp
|
||||
addq n1,n1,n1
|
||||
bis n1,tmp,n1
|
||||
addq n0,n0,n0
|
||||
cmpule d,n1,qb
|
||||
subq n1,d,tmp
|
||||
cmovne qb,tmp,n1
|
||||
bis n0,qb,n0
|
||||
cmplt n0,0,tmp
|
||||
addq n1,n1,n1
|
||||
bis n1,tmp,n1
|
||||
addq n0,n0,n0
|
||||
cmpule d,n1,qb
|
||||
subq n1,d,tmp
|
||||
cmovne qb,tmp,n1
|
||||
bis n0,qb,n0
|
||||
subq cnt,1,cnt
|
||||
bgt cnt,$loop1
|
||||
stq n1,0(rem_ptr)
|
||||
bis $31,n0,$0
|
||||
ret $31,($26),1
|
||||
|
||||
$largedivisor:
|
||||
and n0,1,$4
|
||||
|
||||
srl n0,1,n0
|
||||
sll n1,63,tmp
|
||||
or tmp,n0,n0
|
||||
srl n1,1,n1
|
||||
|
||||
and d,1,$6
|
||||
srl d,1,$5
|
||||
addq $5,$6,$5
|
||||
|
||||
$loop2: cmplt n0,0,tmp
|
||||
addq n1,n1,n1
|
||||
bis n1,tmp,n1
|
||||
addq n0,n0,n0
|
||||
cmpule $5,n1,qb
|
||||
subq n1,$5,tmp
|
||||
cmovne qb,tmp,n1
|
||||
bis n0,qb,n0
|
||||
cmplt n0,0,tmp
|
||||
addq n1,n1,n1
|
||||
bis n1,tmp,n1
|
||||
addq n0,n0,n0
|
||||
cmpule $5,n1,qb
|
||||
subq n1,$5,tmp
|
||||
cmovne qb,tmp,n1
|
||||
bis n0,qb,n0
|
||||
cmplt n0,0,tmp
|
||||
addq n1,n1,n1
|
||||
bis n1,tmp,n1
|
||||
addq n0,n0,n0
|
||||
cmpule $5,n1,qb
|
||||
subq n1,$5,tmp
|
||||
cmovne qb,tmp,n1
|
||||
bis n0,qb,n0
|
||||
cmplt n0,0,tmp
|
||||
addq n1,n1,n1
|
||||
bis n1,tmp,n1
|
||||
addq n0,n0,n0
|
||||
cmpule $5,n1,qb
|
||||
subq n1,$5,tmp
|
||||
cmovne qb,tmp,n1
|
||||
bis n0,qb,n0
|
||||
subq cnt,1,cnt
|
||||
bgt cnt,$loop2
|
||||
|
||||
addq n1,n1,n1
|
||||
addq $4,n1,n1
|
||||
bne $6,$Odd
|
||||
stq n1,0(rem_ptr)
|
||||
bis $31,n0,$0
|
||||
ret $31,($26),1
|
||||
|
||||
$Odd:
|
||||
/* q' in n0. r' in n1 */
|
||||
addq n1,n0,n1
|
||||
|
||||
cmpult n1,n0,tmp # tmp := carry from addq
|
||||
subq n1,d,AT
|
||||
addq n0,tmp,n0
|
||||
cmovne tmp,AT,n1
|
||||
|
||||
cmpult n1,d,tmp
|
||||
addq n0,1,AT
|
||||
cmoveq tmp,AT,n0
|
||||
subq n1,d,AT
|
||||
cmoveq tmp,AT,n1
|
||||
|
||||
stq n1,0(rem_ptr)
|
||||
bis $31,n0,$0
|
||||
ret $31,($26),1
|
||||
|
||||
.end __udiv_qrnnd
|
@ -1,2 +0,0 @@
|
||||
# This is a support routine for longlong.h, used by libgcc2.c.
|
||||
LIB2FUNCS_EXTRA = $(srcdir)/config/alpha/qrnnd.asm
|
@ -1,5 +0,0 @@
|
||||
EXTRA_PARTS += crtfastmath.o
|
||||
|
||||
crtfastmath.o: $(srcdir)/config/alpha/crtfastmath.c $(GCC_PASSES)
|
||||
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -frandom-seed=gcc-crtfastmath -c \
|
||||
-o crtfastmath.o $(srcdir)/config/alpha/crtfastmath.c
|
@ -1,2 +0,0 @@
|
||||
# All alphas get an IEEE complaint set of libraries.
|
||||
TARGET_LIBGCC2_CFLAGS += -mieee
|
@ -1,5 +0,0 @@
|
||||
# Provide dummy POSIX threads functions
|
||||
LIB2FUNCS_EXTRA += $(srcdir)/gthr-posix.c
|
||||
|
||||
# Compile libgcc2 with POSIX threads supports
|
||||
TARGET_LIBGCC2_CFLAGS=-pthread
|
@ -1,30 +0,0 @@
|
||||
# Compile crtbeginS.o and crtendS.o with pic.
|
||||
CRTSTUFF_T_CFLAGS_S = -fPIC
|
||||
|
||||
# Compile libgcc2.a with pic.
|
||||
TARGET_LIBGCC2_CFLAGS = -fPIC
|
||||
|
||||
# Build a shared libgcc library.
|
||||
SHLIB_EXT = .so
|
||||
SHLIB_NAME = @shlib_base_name@.so
|
||||
SHLIB_SONAME = @shlib_base_name@.so.1
|
||||
SHLIB_OBJS = @shlib_objs@
|
||||
|
||||
# Hide all POSIX threads related symbols provided by gthr-posix.c. This
|
||||
# only has an effect if t-osf-pthread is in use.
|
||||
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
|
||||
-Wl,-hidden_symbol,pthread\* -Wl,-hidden_symbol,__pthread\* \
|
||||
-Wl,-hidden_symbol,sched_get_\* -Wl,-hidden_symbol,sched_yield \
|
||||
-Wl,-msym -Wl,-set_version,gcc.1 -Wl,-soname,$(SHLIB_SONAME) \
|
||||
-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
|
||||
rm -f $(SHLIB_SONAME) && \
|
||||
if [ -f $(SHLIB_NAME) ]; then \
|
||||
mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
|
||||
else true; fi && \
|
||||
mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
|
||||
$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
|
||||
# $(slibdir) double quoted to protect it from expansion while building
|
||||
# libgcc.mk. We want this delayed until actual install time.
|
||||
SHLIB_INSTALL = $(INSTALL_DATA) $(SHLIB_NAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_SONAME); \
|
||||
rm -f $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME); \
|
||||
$(LN_S) $(SHLIB_SONAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME)
|
@ -1,2 +0,0 @@
|
||||
# This file is empty for now.
|
||||
|
@ -1,26 +0,0 @@
|
||||
LIB2FUNCS_EXTRA = $(srcdir)/config/alpha/vms_tramp.asm
|
||||
|
||||
# VMS_EXTRA_PARTS is defined in x-vms and represent object files that
|
||||
# are only needed for VMS targets, but can only be compiled on a VMS host
|
||||
# (because they need DEC C).
|
||||
EXTRA_PARTS = vms-dwarf2.o vms-dwarf2eh.o $(VMS_EXTRA_PARTS)
|
||||
|
||||
# This object must be linked with in order to make the executable debuggable.
|
||||
# vms-ld handles it automatically when passed -g.
|
||||
vms-dwarf2.o : $(srcdir)/config/alpha/vms-dwarf2.asm
|
||||
gcc -c -x assembler $< -o $@
|
||||
|
||||
vms-dwarf2eh.o : $(srcdir)/config/alpha/vms-dwarf2eh.asm
|
||||
gcc -c -x assembler $< -o $@
|
||||
|
||||
# Assemble startup files.
|
||||
vcrt0.o: $(CRT0_S) $(GCC_PASSES)
|
||||
decc -c /names=as_is $(srcdir)/config/alpha/vms-crt0.c -o vcrt0.o
|
||||
|
||||
pcrt0.o: $(CRT0_S) $(GCC_PASSES)
|
||||
decc -c /names=as_is $(srcdir)/config/alpha/vms-psxcrt0.c -o pcrt0.o
|
||||
|
||||
MULTILIB_OPTIONS = mcpu=ev6
|
||||
MULTILIB_DIRNAMES = ev6
|
||||
LIBGCC = stmp-multilib
|
||||
INSTALL_LIBGCC = install-multilib
|
@ -1,8 +0,0 @@
|
||||
# Assemble startup files.
|
||||
vcrt0.o: $(CRT0_S) $(GCC_PASSES)
|
||||
decc -c /names=as_is /pointer_size=64 \
|
||||
$(srcdir)/config/alpha/vms-crt0-64.c -o vcrt0.o
|
||||
|
||||
pcrt0.o: $(CRT0_S) $(GCC_PASSES)
|
||||
decc -c /names=as_is /pointer_size=64 \
|
||||
$(srcdir)/config/alpha/vms-psxcrt0-64.c -o pcrt0.o
|
@ -1,501 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler, for DEC Alpha on Cray
|
||||
T3E running Unicos/Mk.
|
||||
Copyright (C) 2001, 2002
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Roman Lechtchinsky (rl@cs.tu-berlin.de)
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef TARGET_ABI_UNICOSMK
|
||||
#define TARGET_ABI_UNICOSMK 1
|
||||
|
||||
/* CAM requires a slash before floating-pointing instruction suffixes. */
|
||||
|
||||
#undef TARGET_AS_SLASH_BEFORE_SUFFIX
|
||||
#define TARGET_AS_SLASH_BEFORE_SUFFIX 1
|
||||
|
||||
/* The following defines are necessary for the standard headers to work
|
||||
correctly. */
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
builtin_define ("__unix"); \
|
||||
builtin_define ("_UNICOS=205"); \
|
||||
builtin_define ("_CRAY"); \
|
||||
builtin_define ("_CRAYT3E"); \
|
||||
builtin_define ("_CRAYMPP"); \
|
||||
builtin_define ("_CRAYIEEE"); \
|
||||
builtin_define ("_ADDR64"); \
|
||||
builtin_define ("_LD64"); \
|
||||
builtin_define ("__UNICOSMK__"); \
|
||||
} while (0)
|
||||
|
||||
#define SHORT_TYPE_SIZE 32
|
||||
|
||||
#undef INT_TYPE_SIZE
|
||||
#define INT_TYPE_SIZE 64
|
||||
|
||||
/* This is consistent with the definition Cray CC uses. */
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 64
|
||||
|
||||
/*
|
||||
#define SIZE_TYPE "unsigned int"
|
||||
#define PTRDIFF_TYPE "int"
|
||||
*/
|
||||
|
||||
/* Alphas are operated in big endian mode on the Cray T3E. */
|
||||
|
||||
#undef BITS_BIG_ENDIAN
|
||||
#undef BYTES_BIG_ENDIAN
|
||||
#undef WORDS_BIG_ENDIAN
|
||||
#define BITS_BIG_ENDIAN 0
|
||||
#define BYTES_BIG_ENDIAN 1
|
||||
#define WORDS_BIG_ENDIAN 1
|
||||
|
||||
|
||||
/* Every structure's size must be a multiple of this. */
|
||||
|
||||
#undef STRUCTURE_SIZE_BOUNDARY
|
||||
#define STRUCTURE_SIZE_BOUNDARY 64
|
||||
|
||||
/* No data type wants to be aligned rounder than this. */
|
||||
|
||||
#undef BIGGEST_ALIGNMENT
|
||||
#define BIGGEST_ALIGNMENT 256
|
||||
|
||||
/* Include the frame pointer in fixed_regs and call_used_regs as it can't be
|
||||
used as a general-purpose register even in frameless functions.
|
||||
??? The global_regs hack is needed for now because -O2 sometimes tries to
|
||||
eliminate $15 increments/decrements in frameless functions. */
|
||||
|
||||
#undef CONDITIONAL_REGISTER_USAGE
|
||||
#define CONDITIONAL_REGISTER_USAGE \
|
||||
do { \
|
||||
fixed_regs[15] = 1; \
|
||||
call_used_regs[15] = 1; \
|
||||
global_regs[15] = 1; \
|
||||
} while(0)
|
||||
|
||||
/* The stack frame grows downward. */
|
||||
|
||||
#define FRAME_GROWS_DOWNWARD
|
||||
|
||||
/* Define the offset between two registers, one to be eliminated, and the
|
||||
other its replacement, at the start of a routine. This is somewhat
|
||||
complicated on the T3E which is why we use a function. */
|
||||
|
||||
#undef INITIAL_ELIMINATION_OFFSET
|
||||
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
|
||||
do { \
|
||||
(OFFSET) = unicosmk_initial_elimination_offset ((FROM), (TO)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* Define this if stack space is still allocated for a parameter passed
|
||||
in a register. On the T3E, stack space is preallocated for all outgoing
|
||||
arguments, including those passed in registers. To avoid problems, we
|
||||
assume that at least 48 bytes (i.e. enough space for all arguments passed
|
||||
in registers) are allocated. */
|
||||
|
||||
#define REG_PARM_STACK_SPACE(DECL) 48
|
||||
#define OUTGOING_REG_PARM_STACK_SPACE
|
||||
|
||||
/* If an argument can't be passed in registers even though not all argument
|
||||
registers have been used yet, it is passed on the stack in the space
|
||||
preallocated for these registers. */
|
||||
|
||||
#define STACK_PARMS_IN_REG_PARM_AREA
|
||||
|
||||
/* This evaluates to nonzero if we do not know how to pass TYPE solely in
|
||||
registers. This is the case for all arguments that do not fit in two
|
||||
registers. */
|
||||
|
||||
#define MUST_PASS_IN_STACK(MODE,TYPE) \
|
||||
((TYPE) != 0 \
|
||||
&& (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \
|
||||
|| (TREE_ADDRESSABLE (TYPE) || ALPHA_ARG_SIZE (MODE, TYPE, 0) > 2)))
|
||||
|
||||
/* Define a data type for recording info about an argument list
|
||||
during the scan of that argument list. This data type should
|
||||
hold all necessary information about the function itself
|
||||
and about the args processed so far, enough to enable macros
|
||||
such as FUNCTION_ARG to determine where the next arg should go.
|
||||
|
||||
On Unicos/Mk, this is a structure that contains various information for
|
||||
the static subroutine information block (SSIB) and the call information
|
||||
word (CIW). */
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The overall number of arguments. */
|
||||
int num_args;
|
||||
|
||||
/* The overall size of the arguments in words. */
|
||||
int num_arg_words;
|
||||
|
||||
/* The number of words passed in registers. */
|
||||
int num_reg_words;
|
||||
|
||||
/* If an argument must be passed in the stack, all subsequent arguments
|
||||
must be passed there, too. This flag indicates whether this is the
|
||||
case. */
|
||||
int force_stack;
|
||||
|
||||
/* This array indicates whether a word is passed in an integer register or
|
||||
a floating point one. */
|
||||
|
||||
/* For each of the 6 register arguments, the corresponding flag in this
|
||||
array indicates whether the argument is passed in an integer or a
|
||||
floating point register. */
|
||||
int reg_args_type[6];
|
||||
|
||||
} unicosmk_arg_info;
|
||||
|
||||
#undef CUMULATIVE_ARGS
|
||||
#define CUMULATIVE_ARGS unicosmk_arg_info
|
||||
|
||||
/* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a
|
||||
function whose data type is FNTYPE. For a library call, FNTYPE is 0. */
|
||||
|
||||
#undef INIT_CUMULATIVE_ARGS
|
||||
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
|
||||
do { (CUM).num_args = 0; \
|
||||
(CUM).num_arg_words = 0; \
|
||||
(CUM).num_reg_words = 0; \
|
||||
(CUM).force_stack = 0; \
|
||||
} while(0)
|
||||
|
||||
/* Update the data in CUM to advance over an argument of mode MODE and data
|
||||
type TYPE. (TYPE is null for libcalls where that information may not be
|
||||
available.)
|
||||
|
||||
On Unicos/Mk, at most 6 words can be passed in registers. Structures
|
||||
which fit in two words are passed in registers, larger structures are
|
||||
passed on stack. */
|
||||
|
||||
#undef FUNCTION_ARG_ADVANCE
|
||||
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
|
||||
do { \
|
||||
int size; \
|
||||
\
|
||||
size = ALPHA_ARG_SIZE (MODE, TYPE, NAMED); \
|
||||
\
|
||||
if (size > 2 || MUST_PASS_IN_STACK (MODE, TYPE) \
|
||||
|| (CUM).num_reg_words + size > 6) \
|
||||
(CUM).force_stack = 1; \
|
||||
\
|
||||
if (! (CUM).force_stack) \
|
||||
{ \
|
||||
int i; \
|
||||
int isfloat; \
|
||||
isfloat = (GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT \
|
||||
|| GET_MODE_CLASS (MODE) == MODE_FLOAT); \
|
||||
for (i = 0; i < size; i++) \
|
||||
{ \
|
||||
(CUM).reg_args_type[(CUM).num_reg_words] = isfloat; \
|
||||
++(CUM).num_reg_words; \
|
||||
} \
|
||||
} \
|
||||
(CUM).num_arg_words += size; \
|
||||
++(CUM).num_args; \
|
||||
} while(0)
|
||||
|
||||
/* An argument is passed either entirely in registers or entirely on stack. */
|
||||
|
||||
#undef FUNCTION_ARG_PARTIAL_NREGS
|
||||
/* #define FUNCTION_ARG_PARTIAL_NREGS(CUM,MODE,TYPE,NAMED) 0 */
|
||||
|
||||
/* This ensures that $15 increments/decrements in leaf functions won't get
|
||||
eliminated. */
|
||||
|
||||
#undef EPILOGUE_USES
|
||||
#define EPILOGUE_USES(REGNO) ((REGNO) == 26 || (REGNO) == 15)
|
||||
|
||||
/* Would have worked, only the stack doesn't seem to be executable
|
||||
#undef TRAMPOLINE_TEMPLATE
|
||||
#define TRAMPOLINE_TEMPLATE(FILE) \
|
||||
do { fprintf (FILE, "\tbr $1,0\n"); \
|
||||
fprintf (FILE, "\tldq $0,12($1)\n"); \
|
||||
fprintf (FILE, "\tldq $1,20($1)\n"); \
|
||||
fprintf (FILE, "\tjmp $31,(r0)\n"); \
|
||||
fprintf (FILE, "\tbis $31,$31,$31\n"); \
|
||||
fprintf (FILE, "\tbis $31,$31,$31\n"); \
|
||||
} while (0) */
|
||||
|
||||
/* We don't support nested functions (yet). */
|
||||
|
||||
#undef TRAMPOLINE_TEMPLATE
|
||||
#define TRAMPOLINE_TEMPLATE(FILE) abort ()
|
||||
|
||||
/* Specify the machine mode that this machine uses for the index in the
|
||||
tablejump instruction. On Unicos/Mk, we don't support relative case
|
||||
vectors yet, thus the entries should be absolute addresses. */
|
||||
|
||||
#undef CASE_VECTOR_MODE
|
||||
#define CASE_VECTOR_MODE DImode
|
||||
|
||||
#undef CASE_VECTOR_PC_RELATIVE
|
||||
|
||||
/* Define this as 1 if `char' should by default be signed; else as 0. */
|
||||
/* #define DEFAULT_SIGNED_CHAR 1 */
|
||||
|
||||
/* The Cray assembler is really weird with respect to sections. It has only
|
||||
named sections and you can't reopen a section once it has been closed.
|
||||
This means that we have to generate unique names whenever we want to
|
||||
reenter the text or the data section. The following is a rather bad hack
|
||||
as TEXT_SECTION_ASM_OP and DATA_SECTION_ASM_OP are supposed to be
|
||||
constants. */
|
||||
|
||||
#undef TEXT_SECTION_ASM_OP
|
||||
#define TEXT_SECTION_ASM_OP unicosmk_text_section ()
|
||||
|
||||
#undef DATA_SECTION_ASM_OP
|
||||
#define DATA_SECTION_ASM_OP unicosmk_data_section ()
|
||||
|
||||
/* There are no read-only sections on Unicos/Mk. */
|
||||
|
||||
#undef READONLY_DATA_SECTION_ASM_OP
|
||||
#define READONLY_DATA_SECTION data_section
|
||||
|
||||
/* Define extra sections for common data and SSIBs (static subroutine
|
||||
information blocks). The actual section header is output by the callers
|
||||
of these functions. */
|
||||
|
||||
#undef EXTRA_SECTIONS
|
||||
#undef EXTRA_SECTION_FUNCTIONS
|
||||
|
||||
#define EXTRA_SECTIONS in_common, in_ssib
|
||||
#define EXTRA_SECTION_FUNCTIONS \
|
||||
COMMON_SECTION \
|
||||
SSIB_SECTION
|
||||
|
||||
extern void common_section (void);
|
||||
#define COMMON_SECTION \
|
||||
void \
|
||||
common_section (void) \
|
||||
{ \
|
||||
in_section = in_common; \
|
||||
}
|
||||
|
||||
extern void ssib_section (void);
|
||||
#define SSIB_SECTION \
|
||||
void \
|
||||
ssib_section (void) \
|
||||
{ \
|
||||
in_section = in_ssib; \
|
||||
}
|
||||
|
||||
/* We take care of this in unicosmk_file_start. */
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_FILENAME
|
||||
|
||||
/* This is how to output a label for a jump table. Arguments are the same as
|
||||
for (*targetm.asm_out.internal_label), except the insn for the jump table is
|
||||
passed. */
|
||||
|
||||
#undef ASM_OUTPUT_CASE_LABEL
|
||||
#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \
|
||||
(*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
|
||||
|
||||
/* CAM has some restrictions with respect to string literals. It won't
|
||||
accept lines with more that 256 characters which means that we have
|
||||
to split long strings. Moreover, it only accepts escape sequences of
|
||||
the form \nnn in the range 0 to 127. We generate .byte directives for
|
||||
escapes characters greater than 127. And finally, ` must be escaped. */
|
||||
|
||||
#undef ASM_OUTPUT_ASCII
|
||||
#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
|
||||
do { \
|
||||
FILE *_hide_asm_out_file = (MYFILE); \
|
||||
const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \
|
||||
int _hide_thissize = (MYLENGTH); \
|
||||
int _size_so_far = 0; \
|
||||
{ \
|
||||
FILE *asm_out_file = _hide_asm_out_file; \
|
||||
const unsigned char *p = _hide_p; \
|
||||
int thissize = _hide_thissize; \
|
||||
int in_ascii = 0; \
|
||||
int i; \
|
||||
\
|
||||
for (i = 0; i < thissize; i++) \
|
||||
{ \
|
||||
register int c = p[i]; \
|
||||
\
|
||||
if (c > 127) \
|
||||
{ \
|
||||
if (in_ascii) \
|
||||
{ \
|
||||
fprintf (asm_out_file, "\"\n"); \
|
||||
in_ascii = 0; \
|
||||
} \
|
||||
\
|
||||
fprintf (asm_out_file, "\t.byte\t%d\n", c); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
if (! in_ascii) \
|
||||
{ \
|
||||
fprintf (asm_out_file, "\t.ascii\t\""); \
|
||||
in_ascii = 1; \
|
||||
_size_so_far = 0; \
|
||||
} \
|
||||
else if (_size_so_far >= 64) \
|
||||
{ \
|
||||
fprintf (asm_out_file, "\"\n\t.ascii\t\""); \
|
||||
_size_so_far = 0; \
|
||||
} \
|
||||
\
|
||||
if (c == '\"' || c == '\\' || c == '`') \
|
||||
putc ('\\', asm_out_file); \
|
||||
if (c >= ' ') \
|
||||
putc (c, asm_out_file); \
|
||||
else \
|
||||
fprintf (asm_out_file, "\\%.3o", c); \
|
||||
++ _size_so_far; \
|
||||
} \
|
||||
} \
|
||||
if (in_ascii) \
|
||||
fprintf (asm_out_file, "\"\n"); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/* This is how to output an element of a case-vector that is absolute. */
|
||||
|
||||
#undef ASM_OUTPUT_ADDR_VEC_ELT
|
||||
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
|
||||
fprintf (FILE, "\t.quad $L%d\n", (VALUE))
|
||||
|
||||
/* This is how to output an element of a case-vector that is relative.
|
||||
(Unicos/Mk does not use such vectors yet). */
|
||||
|
||||
#undef ASM_OUTPUT_ADDR_DIFF_ELT
|
||||
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) abort ()
|
||||
|
||||
/* We can't output case vectors in the same section as the function code
|
||||
because CAM doesn't allow data definitions in code sections. Thus, we
|
||||
simply record the case vectors and put them in a separate section after
|
||||
the function. */
|
||||
|
||||
#define ASM_OUTPUT_ADDR_VEC(LAB,VEC) \
|
||||
unicosmk_defer_case_vector ((LAB),(VEC))
|
||||
|
||||
#define ASM_OUTPUT_ADDR_DIFF_VEC(LAB,VEC) abort ()
|
||||
|
||||
/* This is how to output an assembler line that says to advance the location
|
||||
counter to a multiple of 2**LOG bytes. Annoyingly, CAM always uses zeroes
|
||||
to fill the unused space which does not work in code sections. We have to
|
||||
be careful not to use the .align directive in code sections. */
|
||||
|
||||
#undef ASM_OUTPUT_ALIGN
|
||||
#define ASM_OUTPUT_ALIGN(STREAM,LOG) unicosmk_output_align (STREAM, LOG)
|
||||
|
||||
/* This is how to advance the location counter by SIZE bytes. */
|
||||
|
||||
#undef ASM_OUTPUT_SKIP
|
||||
#define ASM_OUTPUT_SKIP(STREAM,SIZE) \
|
||||
fprintf ((STREAM), "\t.byte\t0:"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
|
||||
(SIZE));
|
||||
|
||||
/* This says how to output an assembler line to define a global common
|
||||
symbol. We need the alignment information because it has to be supplied
|
||||
in the section header. */
|
||||
|
||||
#undef ASM_OUTPUT_COMMON
|
||||
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
|
||||
unicosmk_output_common ((FILE), (NAME), (SIZE), (ALIGN))
|
||||
|
||||
/* This says how to output an assembler line to define a local symbol. */
|
||||
|
||||
#undef ASM_OUTPUT_LOCAL
|
||||
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
|
||||
do { data_section (); \
|
||||
fprintf (FILE, "\t.align\t%d\n", floor_log2 ((ALIGN) / BITS_PER_UNIT));\
|
||||
ASM_OUTPUT_LABEL ((FILE), (NAME)); \
|
||||
fprintf (FILE, "\t.byte 0:"HOST_WIDE_INT_PRINT_UNSIGNED"\n",(SIZE));\
|
||||
} while (0)
|
||||
|
||||
/* CAM does not allow us to declare a symbol as external first and then
|
||||
define it in the same file later. Thus, we keep a list of all external
|
||||
references, remove all symbols defined locally from it and output it at
|
||||
the end of the asm file. */
|
||||
|
||||
#define ASM_OUTPUT_EXTERNAL(FILE,DECL,NAME) \
|
||||
unicosmk_add_extern ((NAME))
|
||||
|
||||
#define ASM_OUTPUT_EXTERNAL_LIBCALL(STREAM,SYMREF) \
|
||||
unicosmk_add_extern (XSTR ((SYMREF), 0))
|
||||
|
||||
/* This is how to declare an object. We don't have to output anything if
|
||||
it is a global variable because those go into unique `common' sections
|
||||
and the section name is globally visible. For local variables, we simply
|
||||
output the label. In any case, we have to record that no extern
|
||||
declaration should be generated for the symbol. */
|
||||
|
||||
#define ASM_DECLARE_OBJECT_NAME(STREAM,NAME,DECL) \
|
||||
do { tree name_tree; \
|
||||
name_tree = get_identifier ((NAME)); \
|
||||
TREE_ASM_WRITTEN (name_tree) = 1; \
|
||||
if (!TREE_PUBLIC (DECL)) \
|
||||
{ \
|
||||
assemble_name (STREAM, NAME); \
|
||||
fputs (":\n", STREAM); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/*
|
||||
#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \
|
||||
unicosmk_output_section_name ((STREAM), (DECL), (NAME), (RELOC))
|
||||
*/
|
||||
|
||||
/* Switch into a generic section. */
|
||||
#define TARGET_ASM_NAMED_SECTION unicosmk_asm_named_section
|
||||
|
||||
#undef ASM_OUTPUT_MAX_SKIP_ALIGN
|
||||
#define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM,POWER,MAXSKIP)
|
||||
|
||||
#undef NM_FLAGS
|
||||
|
||||
#undef OBJECT_FORMAT_COFF
|
||||
|
||||
/* We cannot generate debugging information on Unicos/Mk. */
|
||||
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
#undef MIPS_DEBUGGING_INFO
|
||||
#undef DBX_DEBUGGING_INFO
|
||||
#undef DWARF2_DEBUGGING_INFO
|
||||
#undef DWARF2_UNWIND_INFO
|
||||
#undef INCOMING_RETURN_ADDR_RTX
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
|
||||
/* We don't need a start file. */
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC ""
|
||||
|
||||
/* These are the libraries we have to link with.
|
||||
??? The Craylibs directory should be autoconfed. */
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "-L/opt/ctl/craylibs/craylibs -lu -lm -lc -lsma"
|
||||
|
||||
#undef EXPAND_BUILTIN_VA_START
|
||||
#undef EXPAND_BUILTIN_VA_ARG
|
||||
|
||||
#define EH_FRAME_IN_DATA_SECTION 1
|
@ -1,19 +0,0 @@
|
||||
/* A replacement for Digital Unix's <va_list.h>. */
|
||||
|
||||
#ifndef __GNUC_VA_LIST
|
||||
#define __GNUC_VA_LIST
|
||||
typedef __builtin_va_list __gnuc_va_list;
|
||||
#endif
|
||||
|
||||
#if !defined(_VA_LIST) && !defined(_HIDDEN_VA_LIST)
|
||||
#define _VA_LIST
|
||||
typedef __gnuc_va_list va_list;
|
||||
|
||||
#elif defined(_HIDDEN_VA_LIST) && !defined(_HIDDEN_VA_LIST_DONE)
|
||||
#define _HIDDEN_VA_LIST_DONE
|
||||
typedef __gnuc_va_list __va_list;
|
||||
|
||||
#elif defined(_HIDDEN_VA_LIST) && defined(_VA_LIST)
|
||||
#undef _HIDDEN_VA_LIST
|
||||
|
||||
#endif
|
@ -1,356 +0,0 @@
|
||||
/* VMS DEC C wrapper.
|
||||
Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Douglas B. Rupp (rupp@gnat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This program is a wrapper around the VMS DEC C compiler.
|
||||
It translates Unix style command line options into corresponding
|
||||
VMS style qualifiers and then spawns the DEC C compiler. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "tm.h"
|
||||
|
||||
#undef PATH_SEPARATOR
|
||||
#undef PATH_SEPARATOR_STR
|
||||
#define PATH_SEPARATOR ','
|
||||
#define PATH_SEPARATOR_STR ","
|
||||
|
||||
/* These can be set by command line arguments */
|
||||
static int verbose = 0;
|
||||
static int save_temps = 0;
|
||||
|
||||
static int comp_arg_max = -1;
|
||||
static const char **comp_args = 0;
|
||||
static int comp_arg_index = -1;
|
||||
static char *objfilename = 0;
|
||||
|
||||
static char *system_search_dirs = (char *) "";
|
||||
static char *search_dirs;
|
||||
|
||||
static char *default_defines = (char *) "";
|
||||
static char *defines;
|
||||
|
||||
/* Translate a Unix syntax directory specification into VMS syntax.
|
||||
If indicators of VMS syntax found, return input string. */
|
||||
static char *to_host_dir_spec (char *);
|
||||
|
||||
/* Translate a Unix syntax file specification into VMS syntax.
|
||||
If indicators of VMS syntax found, return input string. */
|
||||
static char *to_host_file_spec (char *);
|
||||
|
||||
/* Add a translated arg to the list to be passed to DEC CC. */
|
||||
static void addarg (const char *);
|
||||
|
||||
/* Preprocess the number of args in P_ARGC and contained in ARGV.
|
||||
Look for special flags, etc. that must be handled first. */
|
||||
static void preprocess_args (int *, char **);
|
||||
|
||||
/* Process the number of args in P_ARGC and contained in ARGV. Look
|
||||
for special flags, etc. that must be handled for the VMS compiler. */
|
||||
static void process_args (int *, char **);
|
||||
|
||||
/* Action routine called by decc$to_vms */
|
||||
static int translate_unix (char *, int);
|
||||
|
||||
/* Add the argument contained in STR to the list of arguments to pass to the
|
||||
compiler. */
|
||||
|
||||
static void
|
||||
addarg (const char *str)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (++comp_arg_index >= comp_arg_max)
|
||||
{
|
||||
const char **new_comp_args
|
||||
= (const char **) xcalloc (comp_arg_max + 1000, sizeof (char *));
|
||||
|
||||
for (i = 0; i <= comp_arg_max; i++)
|
||||
new_comp_args [i] = comp_args [i];
|
||||
|
||||
if (comp_args)
|
||||
free (comp_args);
|
||||
|
||||
comp_arg_max += 1000;
|
||||
comp_args = new_comp_args;
|
||||
}
|
||||
|
||||
comp_args [comp_arg_index] = str;
|
||||
}
|
||||
|
||||
static void
|
||||
preprocess_args (int *p_argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < *p_argc; i++)
|
||||
{
|
||||
if (strcmp (argv[i], "-o") == 0)
|
||||
{
|
||||
char *buff, *ptr;
|
||||
|
||||
i++;
|
||||
ptr = to_host_file_spec (argv[i]);
|
||||
objfilename = xstrdup (ptr);
|
||||
buff = concat ("/obj=", ptr, NULL);
|
||||
addarg (buff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
process_args (int *p_argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < *p_argc; i++)
|
||||
{
|
||||
if (strlen (argv[i]) < 2)
|
||||
continue;
|
||||
|
||||
if (strncmp (argv[i], "-I", 2) == 0)
|
||||
{
|
||||
char *ptr;
|
||||
int new_len, search_dirs_len;
|
||||
|
||||
ptr = to_host_dir_spec (&argv[i][2]);
|
||||
new_len = strlen (ptr);
|
||||
search_dirs_len = strlen (search_dirs);
|
||||
|
||||
search_dirs = xrealloc (search_dirs, search_dirs_len + new_len + 2);
|
||||
if (search_dirs_len > 0)
|
||||
strcat (search_dirs, PATH_SEPARATOR_STR);
|
||||
strcat (search_dirs, ptr);
|
||||
}
|
||||
else if (strncmp (argv[i], "-D", 2) == 0)
|
||||
{
|
||||
char *ptr;
|
||||
int new_len, defines_len;
|
||||
|
||||
ptr = &argv[i][2];
|
||||
new_len = strlen (ptr);
|
||||
defines_len = strlen (defines);
|
||||
|
||||
defines = xrealloc (defines, defines_len + new_len + 4);
|
||||
if (defines_len > 0)
|
||||
strcat (defines, ",");
|
||||
|
||||
strcat (defines, "\"");
|
||||
strcat (defines, ptr);
|
||||
strcat (defines, "\"");
|
||||
}
|
||||
else if (strcmp (argv[i], "-v") == 0)
|
||||
verbose = 1;
|
||||
else if (strcmp (argv[i], "-g0") == 0)
|
||||
addarg ("/nodebug");
|
||||
else if (strcmp (argv[i], "-O0") == 0)
|
||||
addarg ("/noopt");
|
||||
else if (strncmp (argv[i], "-g", 2) == 0)
|
||||
addarg ("/debug");
|
||||
else if (strcmp (argv[i], "-E") == 0)
|
||||
addarg ("/preprocess");
|
||||
else if (strcmp (argv[i], "-save-temps") == 0)
|
||||
save_temps = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* The main program. Spawn the VMS DEC C compiler after fixing up the
|
||||
Unix-like flags and args to be what VMS DEC C wants. */
|
||||
|
||||
typedef struct dsc {unsigned short len, mbz; char *adr; } Descr;
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
char cwdev [128], *devptr;
|
||||
int devlen;
|
||||
char *cwd = getcwd (0, 1024);
|
||||
|
||||
devptr = strchr (cwd, ':');
|
||||
devlen = (devptr - cwd) + 1;
|
||||
strncpy (cwdev, cwd, devlen);
|
||||
cwdev [devlen] = '\0';
|
||||
|
||||
search_dirs = xstrdup (system_search_dirs);
|
||||
defines = xstrdup (default_defines);
|
||||
|
||||
addarg ("cc");
|
||||
preprocess_args (&argc , argv);
|
||||
process_args (&argc , argv);
|
||||
|
||||
if (strlen (search_dirs) > 0)
|
||||
{
|
||||
addarg ("/include=(");
|
||||
addarg (search_dirs);
|
||||
addarg (")");
|
||||
}
|
||||
|
||||
if (strlen (defines) > 0)
|
||||
{
|
||||
addarg ("/define=(");
|
||||
addarg (defines);
|
||||
addarg (")");
|
||||
}
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
int arg_len = strlen (argv[i]);
|
||||
|
||||
if (strcmp (argv[i], "-o") == 0)
|
||||
i++;
|
||||
else if (strcmp (argv[i], "-v" ) == 0
|
||||
|| strcmp (argv[i], "-E") == 0
|
||||
|| strcmp (argv[i], "-c") == 0
|
||||
|| strncmp (argv[i], "-g", 2 ) == 0
|
||||
|| strncmp (argv[i], "-O", 2 ) == 0
|
||||
|| strcmp (argv[i], "-save-temps") == 0
|
||||
|| (arg_len > 2 && strncmp (argv[i], "-I", 2) == 0)
|
||||
|| (arg_len > 2 && strncmp (argv[i], "-D", 2) == 0))
|
||||
;
|
||||
|
||||
/* Unix style file specs and VMS style switches look alike, so assume
|
||||
an arg consisting of one and only one slash, and that being first, is
|
||||
really a switch. */
|
||||
else if ((argv[i][0] == '/') && (strchr (&argv[i][1], '/') == 0))
|
||||
addarg (argv[i]);
|
||||
else
|
||||
{
|
||||
/* Assume filename arg */
|
||||
char buff [256], *ptr;
|
||||
|
||||
ptr = to_host_file_spec (argv[i]);
|
||||
arg_len = strlen (ptr);
|
||||
|
||||
if (ptr[0] == '[')
|
||||
sprintf (buff, "%s%s", cwdev, ptr);
|
||||
else if (strchr (ptr, ':'))
|
||||
sprintf (buff, "%s", ptr);
|
||||
else
|
||||
sprintf (buff, "%s%s", cwd, ptr);
|
||||
|
||||
ptr = xstrdup (buff);
|
||||
addarg (ptr);
|
||||
}
|
||||
}
|
||||
|
||||
addarg (NULL);
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < comp_arg_index; i++)
|
||||
printf ("%s ", comp_args [i]);
|
||||
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
{
|
||||
int i;
|
||||
int len = 0;
|
||||
|
||||
for (i = 0; comp_args[i]; i++)
|
||||
len = len + strlen (comp_args[i]) + 1;
|
||||
|
||||
{
|
||||
char *allargs = (char *) alloca (len + 1);
|
||||
Descr cmd;
|
||||
int status;
|
||||
int status1 = 1;
|
||||
|
||||
for (i = 0; i < len + 1; i++)
|
||||
allargs [i] = 0;
|
||||
|
||||
for (i = 0; comp_args [i]; i++)
|
||||
{
|
||||
strcat (allargs, comp_args [i]);
|
||||
strcat (allargs, " ");
|
||||
}
|
||||
|
||||
cmd.adr = allargs;
|
||||
cmd.len = len;
|
||||
cmd.mbz = 0;
|
||||
|
||||
i = LIB$SPAWN (&cmd, 0, 0, 0, 0, 0, &status);
|
||||
|
||||
if ((i & 1) != 1)
|
||||
{
|
||||
LIB$SIGNAL (i);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if ((status & 1) == 1 && (status1 & 1) == 1)
|
||||
exit (0);
|
||||
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static char new_host_filespec [255];
|
||||
static char new_host_dirspec [255];
|
||||
static char filename_buff [256];
|
||||
|
||||
static int
|
||||
translate_unix (char *name, int type ATTRIBUTE_UNUSED)
|
||||
{
|
||||
strcpy (filename_buff, name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char *
|
||||
to_host_dir_spec (char *dirspec)
|
||||
{
|
||||
int len = strlen (dirspec);
|
||||
|
||||
strcpy (new_host_dirspec, dirspec);
|
||||
|
||||
if (strchr (new_host_dirspec, ']') || strchr (new_host_dirspec, ':'))
|
||||
return new_host_dirspec;
|
||||
|
||||
while (len > 1 && new_host_dirspec [len-1] == '/')
|
||||
{
|
||||
new_host_dirspec [len-1] = 0;
|
||||
len--;
|
||||
}
|
||||
|
||||
decc$to_vms (new_host_dirspec, translate_unix, 1, 2);
|
||||
strcpy (new_host_dirspec, filename_buff);
|
||||
|
||||
return new_host_dirspec;
|
||||
|
||||
}
|
||||
|
||||
static char *
|
||||
to_host_file_spec (char *filespec)
|
||||
{
|
||||
strcpy (new_host_filespec, "");
|
||||
if (strchr (filespec, ']') || strchr (filespec, ':'))
|
||||
strcpy (new_host_filespec, filespec);
|
||||
else
|
||||
{
|
||||
decc$to_vms (filespec, translate_unix, 1, 1);
|
||||
strcpy (new_host_filespec, filename_buff);
|
||||
}
|
||||
|
||||
return new_host_filespec;
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
/* VMS 64bit crt0 returning VMS style condition codes .
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
Contributed by Douglas B. Rupp (rupp@gnat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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 into combinations with other programs,
|
||||
and to distribute those combinations 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 a combine
|
||||
executable.)
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if !defined(__DECC)
|
||||
You Lose! This file can only be compiled with DEC C.
|
||||
#else
|
||||
|
||||
/* This file can only be compiled with DEC C, due to the call to
|
||||
lib$establish and the pragmas pointer_size. */
|
||||
|
||||
#pragma __pointer_size short
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ssdef.h>
|
||||
|
||||
extern void decc$main ();
|
||||
|
||||
extern int main ();
|
||||
|
||||
static int
|
||||
handler (sigargs, mechargs)
|
||||
void *sigargs;
|
||||
void *mechargs;
|
||||
{
|
||||
return SS$_RESIGNAL;
|
||||
}
|
||||
|
||||
int
|
||||
__main (arg1, arg2, arg3, image_file_desc, arg5, arg6)
|
||||
void *arg1, *arg2, *arg3;
|
||||
void *image_file_desc;
|
||||
void *arg5, *arg6;
|
||||
{
|
||||
int argc;
|
||||
char **argv;
|
||||
char **envp;
|
||||
|
||||
#pragma __pointer_size long
|
||||
|
||||
int i;
|
||||
char **long_argv;
|
||||
char **long_envp;
|
||||
|
||||
#pragma __pointer_size short
|
||||
|
||||
lib$establish (handler);
|
||||
decc$main (arg1, arg2, arg3, image_file_desc,
|
||||
arg5, arg6, &argc, &argv, &envp);
|
||||
|
||||
#pragma __pointer_size long
|
||||
|
||||
/* Reallocate argv with 64 bit pointers. */
|
||||
long_argv = (char **) malloc (sizeof (char *) * (argc + 1));
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
long_argv[i] = strdup (argv[i]);
|
||||
|
||||
long_argv[argc] = (char *) 0;
|
||||
|
||||
long_envp = (char **) malloc (sizeof (char *) * 5);
|
||||
|
||||
for (i = 0; envp[i]; i++)
|
||||
long_envp[i] = strdup (envp[i]);
|
||||
|
||||
long_envp[i] = (char *) 0;
|
||||
|
||||
#pragma __pointer_size short
|
||||
|
||||
return main (argc, long_argv, long_envp);
|
||||
}
|
||||
#endif
|
@ -1,71 +0,0 @@
|
||||
/* VMS crt0 returning VMS style condition codes .
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
Contributed by Douglas B. Rupp (rupp@gnat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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 into combinations with other programs,
|
||||
and to distribute those combinations 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 a combine
|
||||
executable.)
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if !defined(__DECC)
|
||||
You Lose! This file can only be compiled with DEC C.
|
||||
#else
|
||||
|
||||
/* This file can only be compiled with DEC C, due to the call to
|
||||
lib$establish. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ssdef.h>
|
||||
|
||||
extern void decc$main ();
|
||||
|
||||
extern int main ();
|
||||
|
||||
static int
|
||||
handler (sigargs, mechargs)
|
||||
void *sigargs;
|
||||
void *mechargs;
|
||||
{
|
||||
return SS$_RESIGNAL;
|
||||
}
|
||||
|
||||
int
|
||||
__main (arg1, arg2, arg3, image_file_desc, arg5, arg6)
|
||||
void *arg1, *arg2, *arg3;
|
||||
void *image_file_desc;
|
||||
void *arg5, *arg6;
|
||||
{
|
||||
int argc;
|
||||
char **argv;
|
||||
char **envp;
|
||||
|
||||
lib$establish (handler);
|
||||
|
||||
decc$main(arg1, arg2, arg3, image_file_desc, arg5, arg6,
|
||||
&argc, &argv, &envp);
|
||||
|
||||
return main (argc, argv, envp);
|
||||
}
|
||||
#endif
|
@ -1,82 +0,0 @@
|
||||
/* VMS dwarf2 section sequentializer.
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
Contributed by Douglas B. Rupp (rupp@gnat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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 into combinations with other programs,
|
||||
and to distribute those combinations 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 a combine
|
||||
executable.)
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Linking with this file forces Dwarf2 debug sections to be
|
||||
sequentially loaded by the VMS linker, enabling GDB to read them. */
|
||||
|
||||
.section .debug_abbrev,NOWRT
|
||||
.align 0
|
||||
.globl $dwarf2.debug_abbrev
|
||||
$dwarf2.debug_abbrev:
|
||||
|
||||
.section .debug_aranges,NOWRT
|
||||
.align 0
|
||||
.globl $dwarf2.debug_aranges
|
||||
$dwarf2.debug_aranges:
|
||||
|
||||
.section .debug_frame,NOWRT
|
||||
.align 0
|
||||
.globl $dwarf2.debug_frame
|
||||
$dwarf2.debug_frame:
|
||||
|
||||
.section .debug_info,NOWRT
|
||||
.align 0
|
||||
.globl $dwarf2.debug_info
|
||||
$dwarf2.debug_info:
|
||||
|
||||
.section .debug_line,NOWRT
|
||||
.align 0
|
||||
.globl $dwarf2.debug_line
|
||||
$dwarf2.debug_line:
|
||||
|
||||
.section .debug_loc,NOWRT
|
||||
.align 0
|
||||
.globl $dwarf2.debug_loc
|
||||
$dwarf2.debug_loc:
|
||||
|
||||
.section .debug_macinfo,NOWRT
|
||||
.align 0
|
||||
.globl $dwarf2.debug_macinfo
|
||||
$dwarf2.debug_macinfo:
|
||||
|
||||
.section .debug_pubnames,NOWRT
|
||||
.align 0
|
||||
.globl $dwarf2.debug_pubnames
|
||||
$dwarf2.debug_pubnames:
|
||||
|
||||
.section .debug_str,NOWRT
|
||||
.align 0
|
||||
.globl $dwarf2.debug_str
|
||||
$dwarf2.debug_str:
|
||||
|
||||
.section .debug_zzzzzz,NOWRT
|
||||
.align 0
|
||||
.globl $dwarf2.debug_zzzzzz
|
||||
$dwarf2.debug_zzzzzz:
|
@ -1,37 +0,0 @@
|
||||
/* VMS dwarf2 exception handling section sequentializer.
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Contributed by Douglas B. Rupp (rupp@gnat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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 into combinations with other programs,
|
||||
and to distribute those combinations 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 a combine
|
||||
executable.)
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Linking with this file forces the Dwarf2 EH section to be
|
||||
individually loaded by the VMS linker an the unwinder to read it. */
|
||||
|
||||
.section .eh_frame,NOWRT
|
||||
.align 0
|
||||
.global __EH_FRAME_BEGIN__
|
||||
__EH_FRAME_BEGIN__:
|
@ -1,764 +0,0 @@
|
||||
/* VMS linker wrapper.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Douglas B. Rupp (rupp@gnat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This program is a wrapper around the VMS linker.
|
||||
It translates Unix style command line options into corresponding
|
||||
VMS style qualifiers and then spawns the VMS linker. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "tm.h"
|
||||
|
||||
typedef struct dsc {unsigned short len, mbz; char *adr; } Descr;
|
||||
|
||||
#undef PATH_SEPARATOR
|
||||
#undef PATH_SEPARATOR_STR
|
||||
#define PATH_SEPARATOR ','
|
||||
#define PATH_SEPARATOR_STR ","
|
||||
|
||||
/* Local variable declarations. */
|
||||
|
||||
/* File specification for vms-dwarf2.o. */
|
||||
static char *vmsdwarf2spec = 0;
|
||||
|
||||
/* File specification for vms-dwarf2eh.o. */
|
||||
static char *vmsdwarf2ehspec = 0;
|
||||
|
||||
/* verbose = 1 if -v passed. */
|
||||
static int verbose = 0;
|
||||
|
||||
/* save_temps = 1 if -save-temps passed. */
|
||||
static int save_temps = 0;
|
||||
|
||||
/* By default don't generate executable file if there are errors
|
||||
in the link. Override with --noinhibit-exec. */
|
||||
static int inhibit_exec = 1;
|
||||
|
||||
/* debug = 1 if -g passed. */
|
||||
static int debug = 0;
|
||||
|
||||
/* By default prefer to link with shareable image libraries.
|
||||
Override with -static. */
|
||||
static int staticp = 0;
|
||||
|
||||
/* By default generate an executable, not a shareable image library.
|
||||
Override with -shared. */
|
||||
static int share = 0;
|
||||
|
||||
/* Remember if IDENTIFICATION given on command line. */
|
||||
static int ident = 0;
|
||||
|
||||
/* Keep track of arg translations. */
|
||||
static int link_arg_max = -1;
|
||||
static const char **link_args = 0;
|
||||
static int link_arg_index = -1;
|
||||
|
||||
/* Keep track of filenames */
|
||||
static char optfilefullname [267];
|
||||
static char *sharefilename = 0;
|
||||
static char *exefilename = 0;
|
||||
|
||||
/* System search dir list. Leave blank since link handles this
|
||||
internally. */
|
||||
static char *system_search_dirs = "";
|
||||
|
||||
/* Search dir list passed on command line (with -L). */
|
||||
static char *search_dirs;
|
||||
|
||||
/* Local function declarations. */
|
||||
|
||||
/* Add STR to the list of arguments to pass to the linker. Expand the list as
|
||||
necessary to accommodate. */
|
||||
static void addarg (const char *);
|
||||
|
||||
/* Check to see if NAME is a regular file, i.e. not a directory */
|
||||
static int is_regular_file (char *);
|
||||
|
||||
/* Translate a Unix syntax file specification FILESPEC into VMS syntax.
|
||||
If indicators of VMS syntax found, return input string. */
|
||||
static char *to_host_file_spec (char *);
|
||||
|
||||
/* Locate the library named LIB_NAME in the set of paths PATH_VAL. */
|
||||
static char *locate_lib (char *, char *);
|
||||
|
||||
/* Given a library name NAME, i.e. foo, Look for libfoo.lib and then
|
||||
libfoo.a in the set of directories we are allowed to search in. */
|
||||
static const char *expand_lib (char *);
|
||||
|
||||
/* Preprocess the number of args P_ARGC in ARGV.
|
||||
Look for special flags, etc. that must be handled first. */
|
||||
static void preprocess_args (int *, char **);
|
||||
|
||||
/* Preprocess the number of args P_ARGC in ARGV. Look for
|
||||
special flags, etc. that must be handled for the VMS linker. */
|
||||
static void process_args (int *, char **);
|
||||
|
||||
/* Action routine called by decc$to_vms. NAME is a file name or
|
||||
directory name. TYPE is unused. */
|
||||
static int translate_unix (char *, int);
|
||||
|
||||
int main (int, char **);
|
||||
|
||||
static void
|
||||
addarg (const char *str)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (++link_arg_index >= link_arg_max)
|
||||
{
|
||||
const char **new_link_args
|
||||
= (const char **) xcalloc (link_arg_max + 1000, sizeof (char *));
|
||||
|
||||
for (i = 0; i <= link_arg_max; i++)
|
||||
new_link_args [i] = link_args [i];
|
||||
|
||||
if (link_args)
|
||||
free (link_args);
|
||||
|
||||
link_arg_max += 1000;
|
||||
link_args = new_link_args;
|
||||
}
|
||||
|
||||
link_args [link_arg_index] = str;
|
||||
}
|
||||
|
||||
static char *
|
||||
locate_lib (char *lib_name, char *path_val)
|
||||
{
|
||||
int lib_len = strlen (lib_name);
|
||||
char *eptr, *sptr;
|
||||
|
||||
for (sptr = path_val; *sptr; sptr = eptr)
|
||||
{
|
||||
char *buf, *ptr;
|
||||
|
||||
while (*sptr == PATH_SEPARATOR)
|
||||
sptr ++;
|
||||
|
||||
eptr = strchr (sptr, PATH_SEPARATOR);
|
||||
if (eptr == 0)
|
||||
eptr = strchr (sptr, 0);
|
||||
|
||||
buf = alloca ((eptr-sptr) + lib_len + 4 + 2);
|
||||
strncpy (buf, sptr, eptr-sptr);
|
||||
buf [eptr-sptr] = 0;
|
||||
strcat (buf, "/");
|
||||
strcat (buf, lib_name);
|
||||
ptr = strchr (buf, 0);
|
||||
|
||||
if (debug || staticp)
|
||||
{
|
||||
/* For debug or static links, look for shareable image libraries
|
||||
last. */
|
||||
strcpy (ptr, ".a");
|
||||
if (is_regular_file (buf))
|
||||
return xstrdup (to_host_file_spec (buf));
|
||||
|
||||
strcpy (ptr, ".olb");
|
||||
if (is_regular_file (buf))
|
||||
return xstrdup (to_host_file_spec (buf));
|
||||
|
||||
strcpy (ptr, ".exe");
|
||||
if (is_regular_file (buf))
|
||||
return xstrdup (to_host_file_spec (buf));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise look for shareable image libraries first. */
|
||||
strcpy (ptr, ".exe");
|
||||
if (is_regular_file (buf))
|
||||
return xstrdup (to_host_file_spec (buf));
|
||||
|
||||
strcpy (ptr, ".a");
|
||||
if (is_regular_file (buf))
|
||||
return xstrdup (to_host_file_spec (buf));
|
||||
|
||||
strcpy (ptr, ".olb");
|
||||
if (is_regular_file (buf))
|
||||
return xstrdup (to_host_file_spec (buf));
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char *
|
||||
expand_lib (char *name)
|
||||
{
|
||||
char *lib, *lib_path;
|
||||
|
||||
if (strcmp (name, "c") == 0)
|
||||
/* IEEE VAX C compatible library for non-prefixed (e.g. no DECC$)
|
||||
C RTL functions. */
|
||||
return "sys$library:vaxcrtltx.olb";
|
||||
|
||||
else if (strcmp (name, "m") == 0)
|
||||
/* No separate library for math functions */
|
||||
return "";
|
||||
|
||||
else
|
||||
{
|
||||
lib = xmalloc (strlen (name) + 14);
|
||||
|
||||
strcpy (lib, "lib");
|
||||
strcat (lib, name);
|
||||
lib_path = locate_lib (lib, search_dirs);
|
||||
|
||||
if (lib_path)
|
||||
return lib_path;
|
||||
}
|
||||
|
||||
fprintf (stderr,
|
||||
"Couldn't locate library: lib%s.exe, lib%s.a or lib%s.olb\n",
|
||||
name, name, name);
|
||||
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static int
|
||||
is_regular_file (char *name)
|
||||
{
|
||||
int ret;
|
||||
struct stat statbuf;
|
||||
|
||||
ret = stat (name, &statbuf);
|
||||
return !ret && S_ISREG (statbuf.st_mode);
|
||||
}
|
||||
|
||||
static void
|
||||
preprocess_args (int *p_argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < *p_argc; i++)
|
||||
if (strlen (argv[i]) >= 6 && strncmp (argv[i], "-shared", 7) == 0)
|
||||
share = 1;
|
||||
|
||||
for (i = 1; i < *p_argc; i++)
|
||||
if (strcmp (argv[i], "-o") == 0)
|
||||
{
|
||||
char *buff, *ptr;
|
||||
int out_len;
|
||||
int len;
|
||||
|
||||
i++;
|
||||
ptr = to_host_file_spec (argv[i]);
|
||||
exefilename = xstrdup (ptr);
|
||||
out_len = strlen (ptr);
|
||||
buff = xmalloc (out_len + 18);
|
||||
|
||||
if (share)
|
||||
strcpy (buff, "/share=");
|
||||
else
|
||||
strcpy (buff, "/exe=");
|
||||
|
||||
strcat (buff, ptr);
|
||||
addarg (buff);
|
||||
|
||||
if (share)
|
||||
{
|
||||
sharefilename = xmalloc (out_len+5);
|
||||
if (ptr == strchr (argv[i], ']'))
|
||||
strcpy (sharefilename, ++ptr);
|
||||
else if (ptr == strchr (argv[i], ':'))
|
||||
strcpy (sharefilename, ++ptr);
|
||||
else if (ptr == strrchr (argv[i], '/'))
|
||||
strcpy (sharefilename, ++ptr);
|
||||
else
|
||||
strcpy (sharefilename, argv[i]);
|
||||
|
||||
len = strlen (sharefilename);
|
||||
if (strncasecmp (&sharefilename[len-4], ".exe", 4) == 0)
|
||||
sharefilename[len-4] = 0;
|
||||
|
||||
for (ptr = sharefilename; *ptr; ptr++)
|
||||
*ptr = TOUPPER (*ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
process_args (int *p_argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < *p_argc; i++)
|
||||
{
|
||||
if (strlen (argv[i]) < 2)
|
||||
continue;
|
||||
|
||||
if (strncmp (argv[i], "-L", 2) == 0)
|
||||
{
|
||||
char *nbuff, *ptr;
|
||||
int new_len, search_dirs_len;
|
||||
|
||||
ptr = &argv[i][2];
|
||||
new_len = strlen (ptr);
|
||||
search_dirs_len = strlen (search_dirs);
|
||||
|
||||
nbuff = xmalloc (new_len + 1);
|
||||
strcpy (nbuff, ptr);
|
||||
|
||||
/* Remove trailing slashes. */
|
||||
while (new_len > 1 && nbuff [new_len - 1] == '/')
|
||||
{
|
||||
nbuff [new_len - 1] = 0;
|
||||
new_len--;
|
||||
}
|
||||
|
||||
search_dirs = xrealloc (search_dirs, search_dirs_len + new_len + 2);
|
||||
if (search_dirs_len > 0)
|
||||
strcat (search_dirs, PATH_SEPARATOR_STR);
|
||||
|
||||
strcat (search_dirs, nbuff);
|
||||
free (nbuff);
|
||||
}
|
||||
|
||||
/* -v turns on verbose option here and is passed on to gcc. */
|
||||
else if (strcmp (argv[i], "-v") == 0)
|
||||
verbose = 1;
|
||||
else if (strcmp (argv[i], "-g0") == 0)
|
||||
addarg ("/notraceback");
|
||||
else if (strncmp (argv[i], "-g", 2) == 0)
|
||||
{
|
||||
addarg ("/debug");
|
||||
debug = 1;
|
||||
}
|
||||
else if (strcmp (argv[i], "-static") == 0)
|
||||
staticp = 1;
|
||||
else if (strcmp (argv[i], "-map") == 0)
|
||||
{
|
||||
char *buff, *ptr;
|
||||
|
||||
buff = xmalloc (strlen (exefilename) + 5);
|
||||
strcpy (buff, exefilename);
|
||||
ptr = strchr (buff, '.');
|
||||
if (ptr)
|
||||
*ptr = 0;
|
||||
|
||||
strcat (buff, ".map");
|
||||
addarg ("/map=");
|
||||
addarg (buff);
|
||||
addarg ("/full");
|
||||
}
|
||||
else if (strcmp (argv[i], "-save-temps") == 0)
|
||||
save_temps = 1;
|
||||
else if (strcmp (argv[i], "--noinhibit-exec") == 0)
|
||||
inhibit_exec = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* The main program. Spawn the VMS linker after fixing up the Unix-like flags
|
||||
and args to be what the VMS linker wants. */
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
char cwdev [128], *devptr;
|
||||
int devlen;
|
||||
int optfd;
|
||||
FILE *optfile;
|
||||
char *cwd = getcwd (0, 1024);
|
||||
char *optfilename;
|
||||
|
||||
devptr = strchr (cwd, ':');
|
||||
devlen = (devptr - cwd) + 1;
|
||||
strncpy (cwdev, cwd, devlen);
|
||||
cwdev [devlen] = '\0';
|
||||
|
||||
search_dirs = xstrdup (system_search_dirs);
|
||||
|
||||
addarg ("link");
|
||||
|
||||
/* Pass to find args that have to be append first. */
|
||||
preprocess_args (&argc , argv);
|
||||
|
||||
/* Pass to find the rest of the args. */
|
||||
process_args (&argc , argv);
|
||||
|
||||
/* Create a temp file to hold args, otherwise we can easily exceed the VMS
|
||||
command line length limits. */
|
||||
optfilename = alloca (strlen ("LDXXXXXX") + 1);
|
||||
strcpy (optfilename, "LDXXXXXX");
|
||||
optfd = mkstemp (optfilename);
|
||||
getcwd (optfilefullname, 256, 1); /* VMS style cwd. */
|
||||
strcat (optfilefullname, optfilename);
|
||||
strcat (optfilefullname, ".");
|
||||
optfile = fdopen (optfd, "w");
|
||||
|
||||
/* Write out the IDENTIFICATION argument first so that it can be overridden
|
||||
by an options file. */
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
int arg_len = strlen (argv[i]);
|
||||
|
||||
if (arg_len > 6 && strncasecmp (argv[i], "IDENT=", 6) == 0)
|
||||
{
|
||||
/* Comes from command line. If present will always appear before
|
||||
IDENTIFICATION=... and will override. */
|
||||
|
||||
if (!ident)
|
||||
ident = 1;
|
||||
}
|
||||
else if (arg_len > 15
|
||||
&& strncasecmp (argv[i], "IDENTIFICATION=", 15) == 0)
|
||||
{
|
||||
/* Comes from pragma Ident (). */
|
||||
|
||||
if (!ident)
|
||||
{
|
||||
fprintf (optfile, "case_sensitive=yes\n");
|
||||
fprintf (optfile, "IDENTIFICATION=\"%15.15s\"\n", &argv[i][15]);
|
||||
fprintf (optfile, "case_sensitive=NO\n");
|
||||
ident = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
int arg_len = strlen (argv[i]);
|
||||
|
||||
if (strcmp (argv[i], "-o") == 0)
|
||||
i++;
|
||||
else if (arg_len > 2 && strncmp (argv[i], "-l", 2) == 0)
|
||||
{
|
||||
const char *libname = expand_lib (&argv[i][2]);
|
||||
const char *ext;
|
||||
int len;
|
||||
|
||||
if ((len = strlen (libname)) > 0)
|
||||
{
|
||||
char buff [256];
|
||||
|
||||
if (len > 4 && strcasecmp (&libname [len-4], ".exe") == 0)
|
||||
ext = "/shareable";
|
||||
else
|
||||
ext = "/library";
|
||||
|
||||
if (libname[0] == '[')
|
||||
sprintf (buff, "%s%s", cwdev, libname);
|
||||
else
|
||||
sprintf (buff, "%s", libname);
|
||||
|
||||
fprintf (optfile, "%s%s\n", buff, ext);
|
||||
}
|
||||
}
|
||||
|
||||
else if (strcmp (argv[i], "-v" ) == 0
|
||||
|| strncmp (argv[i], "-g", 2 ) == 0
|
||||
|| strcmp (argv[i], "-static" ) == 0
|
||||
|| strcmp (argv[i], "-map" ) == 0
|
||||
|| strcmp (argv[i], "-save-temps") == 0
|
||||
|| strcmp (argv[i], "--noinhibit-exec") == 0
|
||||
|| (arg_len > 2 && strncmp (argv[i], "-L", 2) == 0)
|
||||
|| (arg_len >= 6 && strncmp (argv[i], "-share", 6) == 0))
|
||||
;
|
||||
else if (arg_len > 1 && argv[i][0] == '@')
|
||||
{
|
||||
FILE *atfile;
|
||||
char *ptr, *ptr1;
|
||||
struct stat statbuf;
|
||||
char *buff;
|
||||
int len;
|
||||
|
||||
if (stat (&argv[i][1], &statbuf))
|
||||
{
|
||||
fprintf (stderr, "Couldn't open linker response file: %s\n",
|
||||
&argv[i][1]);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
buff = xmalloc (statbuf.st_size + 1);
|
||||
atfile = fopen (&argv[i][1], "r");
|
||||
fgets (buff, statbuf.st_size + 1, atfile);
|
||||
fclose (atfile);
|
||||
|
||||
len = strlen (buff);
|
||||
if (buff [len - 1] == '\n')
|
||||
{
|
||||
buff [len - 1] = 0;
|
||||
len--;
|
||||
}
|
||||
|
||||
ptr = buff;
|
||||
|
||||
do
|
||||
{
|
||||
ptr1 = strchr (ptr, ' ');
|
||||
if (ptr1)
|
||||
*ptr1 = 0;
|
||||
ptr = to_host_file_spec (ptr);
|
||||
if (ptr[0] == '[')
|
||||
fprintf (optfile, "%s%s\n", cwdev, ptr);
|
||||
else
|
||||
fprintf (optfile, "%s\n", ptr);
|
||||
ptr = ptr1 + 1;
|
||||
} while (ptr1);
|
||||
}
|
||||
|
||||
/* Unix style file specs and VMS style switches look alike, so assume an
|
||||
arg consisting of one and only one slash, and that being first, is
|
||||
really a switch. */
|
||||
else if ((argv[i][0] == '/') && (strchr (&argv[i][1], '/') == 0))
|
||||
addarg (argv[i]);
|
||||
else if (arg_len > 4
|
||||
&& strncasecmp (&argv[i][arg_len-4], ".OPT", 4) == 0)
|
||||
{
|
||||
FILE *optfile1;
|
||||
char buff [256];
|
||||
|
||||
optfile1 = fopen (argv[i], "r");
|
||||
while (fgets (buff, 256, optfile1))
|
||||
fputs (buff, optfile);
|
||||
|
||||
fclose (optfile1);
|
||||
}
|
||||
else if (arg_len > 7 && strncasecmp (argv[i], "GSMATCH", 7) == 0)
|
||||
fprintf (optfile, "%s\n", argv[i]);
|
||||
else if (arg_len > 6 && strncasecmp (argv[i], "IDENT=", 6) == 0)
|
||||
{
|
||||
/* Comes from command line and will override pragma. */
|
||||
fprintf (optfile, "case_sensitive=yes\n");
|
||||
fprintf (optfile, "IDENT=\"%15.15s\"\n", &argv[i][6]);
|
||||
fprintf (optfile, "case_sensitive=NO\n");
|
||||
ident = 1;
|
||||
}
|
||||
else if (arg_len > 15
|
||||
&& strncasecmp (argv[i], "IDENTIFICATION=", 15) == 0)
|
||||
;
|
||||
else
|
||||
{
|
||||
/* Assume filename arg. */
|
||||
const char *addswitch = "";
|
||||
char buff [256];
|
||||
int buff_len;
|
||||
int is_cld = 0;
|
||||
|
||||
argv[i] = to_host_file_spec (argv[i]);
|
||||
arg_len = strlen (argv[i]);
|
||||
|
||||
if (arg_len > 4 && strcasecmp (&argv[i][arg_len-4], ".exe") == 0)
|
||||
addswitch = "/shareable";
|
||||
|
||||
if (arg_len > 4 && strcasecmp (&argv[i][arg_len-4], ".cld") == 0)
|
||||
{
|
||||
addswitch = "/shareable";
|
||||
is_cld = 1;
|
||||
}
|
||||
|
||||
if (arg_len > 2 && strcasecmp (&argv[i][arg_len-2], ".a") == 0)
|
||||
addswitch = "/lib";
|
||||
|
||||
if (arg_len > 4 && strcasecmp (&argv[i][arg_len-4], ".olb") == 0)
|
||||
addswitch = "/lib";
|
||||
|
||||
if (argv[i][0] == '[')
|
||||
sprintf (buff, "%s%s%s\n", cwdev, argv[i], addswitch);
|
||||
else if (strchr (argv[i], ':'))
|
||||
sprintf (buff, "%s%s\n", argv[i], addswitch);
|
||||
else
|
||||
sprintf (buff, "%s%s%s\n", cwd, argv[i], addswitch);
|
||||
|
||||
buff_len = strlen (buff);
|
||||
|
||||
if (buff_len >= 15
|
||||
&& strcasecmp (&buff[buff_len - 15], "vms-dwarf2eh.o\n") == 0)
|
||||
vmsdwarf2ehspec = xstrdup (buff);
|
||||
else if (buff_len >= 13
|
||||
&& strcasecmp (&buff[buff_len - 13],"vms-dwarf2.o\n") == 0)
|
||||
vmsdwarf2spec = xstrdup (buff);
|
||||
else if (is_cld)
|
||||
{
|
||||
addarg (buff);
|
||||
addarg (",");
|
||||
}
|
||||
else
|
||||
fprintf (optfile, buff);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (share)
|
||||
fprintf (optfile, "symbol_vector=(main=procedure)\n");
|
||||
#endif
|
||||
|
||||
if (vmsdwarf2ehspec)
|
||||
{
|
||||
fprintf (optfile, "case_sensitive=yes\n");
|
||||
fprintf (optfile, "cluster=DWARF2eh,,,%s", vmsdwarf2ehspec);
|
||||
fprintf (optfile, "collect=DWARF2eh,eh_frame\n");
|
||||
fprintf (optfile, "case_sensitive=NO\n");
|
||||
}
|
||||
|
||||
if (debug && vmsdwarf2spec)
|
||||
{
|
||||
fprintf (optfile, "case_sensitive=yes\n");
|
||||
fprintf (optfile, "cluster=DWARF2debug,,,%s", vmsdwarf2spec);
|
||||
fprintf (optfile, "collect=DWARF2debug,debug_abbrev,debug_aranges,-\n");
|
||||
fprintf (optfile, " debug_frame,debug_info,debug_line,debug_loc,-\n");
|
||||
fprintf (optfile, " debug_macinfo,debug_pubnames,debug_str,-\n");
|
||||
fprintf (optfile, " debug_zzzzzz\n");
|
||||
fprintf (optfile, "case_sensitive=NO\n");
|
||||
}
|
||||
|
||||
if (debug && share)
|
||||
{
|
||||
fprintf (optfile, "case_sensitive=yes\n");
|
||||
fprintf (optfile, "symbol_vector=(-\n");
|
||||
fprintf (optfile,
|
||||
"%s$DWARF2.DEBUG_ABBREV/$dwarf2.debug_abbrev=DATA,-\n",
|
||||
sharefilename);
|
||||
fprintf (optfile,
|
||||
"%s$DWARF2.DEBUG_ARANGES/$dwarf2.debug_aranges=DATA,-\n",
|
||||
sharefilename);
|
||||
fprintf (optfile, "%s$DWARF2.DEBUG_FRAME/$dwarf2.debug_frame=DATA,-\n",
|
||||
sharefilename);
|
||||
fprintf (optfile, "%s$DWARF2.DEBUG_INFO/$dwarf2.debug_info=DATA,-\n",
|
||||
sharefilename);
|
||||
fprintf (optfile, "%s$DWARF2.DEBUG_LINE/$dwarf2.debug_line=DATA,-\n",
|
||||
sharefilename);
|
||||
fprintf (optfile, "%s$DWARF2.DEBUG_LOC/$dwarf2.debug_loc=DATA,-\n",
|
||||
sharefilename);
|
||||
fprintf (optfile,
|
||||
"%s$DWARF2.DEBUG_MACINFO/$dwarf2.debug_macinfo=DATA,-\n",
|
||||
sharefilename);
|
||||
fprintf (optfile,
|
||||
"%s$DWARF2.DEBUG_PUBNAMES/$dwarf2.debug_pubnames=DATA,-\n",
|
||||
sharefilename);
|
||||
fprintf (optfile, "%s$DWARF2.DEBUG_STR/$dwarf2.debug_str=DATA,-\n",
|
||||
sharefilename);
|
||||
fprintf (optfile, "%s$DWARF2.DEBUG_ZZZZZZ/$dwarf2.debug_zzzzzz=DATA)\n",
|
||||
sharefilename);
|
||||
fprintf (optfile, "case_sensitive=NO\n");
|
||||
}
|
||||
|
||||
fclose (optfile);
|
||||
addarg (optfilefullname);
|
||||
addarg ("/opt");
|
||||
|
||||
addarg (NULL);
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < link_arg_index; i++)
|
||||
printf ("%s ", link_args [i]);
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
{
|
||||
int i;
|
||||
int len = 0;
|
||||
|
||||
for (i = 0; link_args[i]; i++)
|
||||
len = len + strlen (link_args[i]) + 1;
|
||||
|
||||
{
|
||||
char *allargs = (char *) alloca (len + 1);
|
||||
Descr cmd;
|
||||
int status;
|
||||
int status1 = 1;
|
||||
|
||||
for (i = 0; i < len + 1; i++)
|
||||
allargs [i] = 0;
|
||||
|
||||
for (i = 0; link_args [i]; i++)
|
||||
{
|
||||
strcat (allargs, link_args [i]);
|
||||
strcat (allargs, " ");
|
||||
}
|
||||
|
||||
cmd.adr = allargs;
|
||||
cmd.len = len;
|
||||
cmd.mbz = 0;
|
||||
|
||||
i = LIB$SPAWN (&cmd, 0, 0, 0, 0, 0, &status);
|
||||
if ((i & 1) != 1)
|
||||
{
|
||||
LIB$SIGNAL (i);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (debug && !share)
|
||||
{
|
||||
strcpy (allargs, "@gnu:[bin]set_exe ");
|
||||
strcat (allargs, exefilename);
|
||||
strcat (allargs, " /nodebug /silent");
|
||||
len = strlen (allargs);
|
||||
cmd.adr = allargs;
|
||||
cmd.len = len;
|
||||
cmd.mbz = 0;
|
||||
|
||||
if (verbose)
|
||||
printf (allargs);
|
||||
|
||||
i = LIB$SPAWN (&cmd, 0, 0, 0, 0, 0, &status1);
|
||||
|
||||
if ((i & 1) != 1)
|
||||
{
|
||||
LIB$SIGNAL (i);
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!save_temps)
|
||||
remove (optfilefullname);
|
||||
|
||||
if ((status & 1) == 1 && (status1 & 1) == 1)
|
||||
exit (0);
|
||||
|
||||
if (exefilename && inhibit_exec == 1)
|
||||
remove (exefilename);
|
||||
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static char new_host_filespec [255];
|
||||
static char filename_buff [256];
|
||||
|
||||
static int
|
||||
translate_unix (char *name, int type ATTRIBUTE_UNUSED)
|
||||
{
|
||||
strcpy (filename_buff, name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char *
|
||||
to_host_file_spec (char *filespec)
|
||||
{
|
||||
strcpy (new_host_filespec, "");
|
||||
if (strchr (filespec, ']') || strchr (filespec, ':'))
|
||||
strcpy (new_host_filespec, filespec);
|
||||
else
|
||||
{
|
||||
decc$to_vms (filespec, translate_unix, 1, 1);
|
||||
strcpy (new_host_filespec, filename_buff);
|
||||
}
|
||||
|
||||
return new_host_filespec;
|
||||
}
|
@ -1,128 +0,0 @@
|
||||
/* VMS 64bit crt0 returning Unix style condition codes .
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
Contributed by Douglas B. Rupp (rupp@gnat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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 into combinations with other programs,
|
||||
and to distribute those combinations 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 a combine
|
||||
executable.)
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if !defined(__DECC)
|
||||
You Lose! This file can only be compiled with DEC C.
|
||||
#else
|
||||
|
||||
/* This file can only be compiled with DEC C, due to the call to
|
||||
lib$establish and the pragmas pointer_size. */
|
||||
|
||||
#pragma __pointer_size short
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ssdef.h>
|
||||
#include <stsdef.h>
|
||||
#include <errnodef.h>
|
||||
|
||||
extern void decc$main ();
|
||||
extern int main ();
|
||||
|
||||
static int
|
||||
handler (sigargs, mechargs)
|
||||
void *sigargs;
|
||||
void *mechargs;
|
||||
{
|
||||
return SS$_RESIGNAL;
|
||||
}
|
||||
|
||||
int
|
||||
__main (arg1, arg2, arg3, image_file_desc, arg5, arg6)
|
||||
void *arg1, *arg2, *arg3;
|
||||
void *image_file_desc;
|
||||
void *arg5, *arg6)
|
||||
{
|
||||
int argc;
|
||||
char **argv;
|
||||
char **envp;
|
||||
|
||||
#pragma __pointer_size long
|
||||
|
||||
int i;
|
||||
char **long_argv;
|
||||
char **long_envp;
|
||||
int status;
|
||||
|
||||
#pragma __pointer_size short
|
||||
|
||||
lib$establish (handler);
|
||||
decc$main (arg1, arg2, arg3, image_file_desc,
|
||||
arg5, arg6, &argc, &argv, &envp);
|
||||
|
||||
#pragma __pointer_size long
|
||||
|
||||
/* Reallocate argv with 64 bit pointers. */
|
||||
long_argv = (char **) malloc (sizeof (char *) * (argc + 1));
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
long_argv[i] = strdup (argv[i]);
|
||||
|
||||
long_argv[argc] = (char *) 0;
|
||||
|
||||
long_envp = (char **) malloc (sizeof (char *) * 5);
|
||||
|
||||
for (i = 0; envp[i]; i++)
|
||||
long_envp[i] = strdup (envp[i]);
|
||||
|
||||
long_envp[i] = (char *) 0;
|
||||
|
||||
#pragma __pointer_size short
|
||||
|
||||
status = main (argc, long_argv, long_envp);
|
||||
|
||||
/* Map into a range of 0 - 255. */
|
||||
status = status & 255;
|
||||
|
||||
if (status > 0)
|
||||
{
|
||||
int save_status = status;
|
||||
|
||||
status = C$_EXIT1 + ((status - 1) << STS$V_MSG_NO);
|
||||
|
||||
/* An exit failure status requires a "severe" error. All status values
|
||||
are defined in errno with a successful (1) severity but can be
|
||||
changed to an error (2) severity by adding 1. In addition for
|
||||
compatibility with UNIX exit() routines we inhibit a run-time error
|
||||
message from being generated on exit(1). */
|
||||
|
||||
if (save_status == 1)
|
||||
{
|
||||
status++;
|
||||
status |= STS$M_INHIB_MSG;
|
||||
}
|
||||
}
|
||||
|
||||
if (status == 0)
|
||||
status = SS$_NORMAL;
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
@ -1,99 +0,0 @@
|
||||
/* VMS crt0 returning Unix style condition codes .
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
Contributed by Douglas B. Rupp (rupp@gnat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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 into combinations with other programs,
|
||||
and to distribute those combinations 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 a combine
|
||||
executable.)
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if !defined(__DECC)
|
||||
You Lose! This file can only be compiled with DEC C.
|
||||
#else
|
||||
|
||||
/* This file can only be compiled with DEC C, due to the call to
|
||||
lib$establish. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ssdef.h>
|
||||
#include <stsdef.h>
|
||||
#include <errnodef.h>
|
||||
|
||||
extern void decc$main ();
|
||||
extern int main ();
|
||||
|
||||
static int
|
||||
handler (sigargs, mechargs)
|
||||
void *sigargs;
|
||||
void *mechargs;
|
||||
{
|
||||
return SS$_RESIGNAL;
|
||||
}
|
||||
|
||||
int
|
||||
__main (arg1, arg2, arg3, image_file_desc, arg5, arg6)
|
||||
void *arg1, *arg2, *arg3;
|
||||
void *image_file_desc;
|
||||
void *arg5, *arg6;
|
||||
{
|
||||
int argc;
|
||||
char **argv;
|
||||
char **envp;
|
||||
int status;
|
||||
|
||||
lib$establish (handler);
|
||||
decc$main (arg1, arg2, arg3, image_file_desc, arg5, arg6,
|
||||
&argc, &argv, &envp);
|
||||
|
||||
status = main (argc, argv, envp);
|
||||
|
||||
/* Map into a range of 0 - 255. */
|
||||
status = status & 255;
|
||||
|
||||
if (status > 0)
|
||||
{
|
||||
int save_status = status;
|
||||
|
||||
status = C$_EXIT1 + ((status - 1) << STS$V_MSG_NO);
|
||||
|
||||
/* An exit failure status requires a "severe" error
|
||||
All status values are defined in errno with a successful
|
||||
(1) severity but can be changed to an error (2) severity by adding 1.
|
||||
In addition for compatibility with UNIX exit() routines we inhibit
|
||||
a run-time error message from being generated on exit(1). */
|
||||
|
||||
if (save_status == 1)
|
||||
{
|
||||
status++;
|
||||
status |= STS$M_INHIB_MSG;
|
||||
}
|
||||
}
|
||||
|
||||
if (status == 0)
|
||||
status = SS$_NORMAL;
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
@ -1,450 +0,0 @@
|
||||
/* Output variables, constants and external declarations, for GNU compiler.
|
||||
Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2004
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define TARGET_OBJECT_SUFFIX ".obj"
|
||||
#define TARGET_EXECUTABLE_SUFFIX ".exe"
|
||||
|
||||
/* This enables certain macros in alpha.h, which will make an indirect
|
||||
reference to an external symbol an invalid address. This needs to be
|
||||
defined before we include alpha.h, since it determines which macros
|
||||
are used for GO_IF_*. */
|
||||
|
||||
#define NO_EXTERNAL_INDIRECT_ADDRESS
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
builtin_define_std ("vms"); \
|
||||
builtin_define_std ("VMS"); \
|
||||
builtin_define ("__ALPHA"); \
|
||||
builtin_assert ("system=vms"); \
|
||||
if (TARGET_FLOAT_VAX) \
|
||||
builtin_define ("__G_FLOAT"); \
|
||||
else \
|
||||
builtin_define ("__IEEE_FLOAT"); \
|
||||
} while (0)
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_FP|MASK_FPREGS|MASK_GAS)
|
||||
#undef TARGET_ABI_OPEN_VMS
|
||||
#define TARGET_ABI_OPEN_VMS 1
|
||||
|
||||
#undef TARGET_NAME
|
||||
#define TARGET_NAME "OpenVMS/Alpha"
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME);
|
||||
|
||||
#undef PCC_STATIC_STRUCT_RETURN
|
||||
|
||||
/* "long" is 32 bits, but 64 bits for Ada. */
|
||||
#undef LONG_TYPE_SIZE
|
||||
#define LONG_TYPE_SIZE 32
|
||||
#define ADA_LONG_TYPE_SIZE 64
|
||||
|
||||
/* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended. */
|
||||
#undef POINTER_SIZE
|
||||
#define POINTER_SIZE 32
|
||||
#define POINTERS_EXTEND_UNSIGNED 0
|
||||
|
||||
#define MAX_OFILE_ALIGNMENT 524288 /* 8 x 2^16 by DEC Ada Test CD40VRA */
|
||||
|
||||
#undef FIXED_REGISTERS
|
||||
#define FIXED_REGISTERS \
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }
|
||||
|
||||
#undef CALL_USED_REGISTERS
|
||||
#define CALL_USED_REGISTERS \
|
||||
{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
|
||||
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, \
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
|
||||
|
||||
/* List the order in which to allocate registers. Each register must be
|
||||
listed once, even those in FIXED_REGISTERS.
|
||||
|
||||
We allocate in the following order:
|
||||
$f1 (nonsaved floating-point register)
|
||||
$f10-$f15 (likewise)
|
||||
$f22-$f30 (likewise)
|
||||
$f21-$f16 (likewise, but input args)
|
||||
$f0 (nonsaved, but return value)
|
||||
$f2-$f9 (saved floating-point registers)
|
||||
$1 (nonsaved integer registers)
|
||||
$22-$25 (likewise)
|
||||
$28 (likewise)
|
||||
$0 (likewise, but return value)
|
||||
$21-$16 (likewise, but input args)
|
||||
$27 (procedure value in OSF, nonsaved in NT)
|
||||
$2-$8 (saved integer registers)
|
||||
$9-$14 (saved integer registers)
|
||||
$26 (return PC)
|
||||
$15 (frame pointer)
|
||||
$29 (global pointer)
|
||||
$30, $31, $f31 (stack pointer and always zero/ap & fp) */
|
||||
|
||||
#undef REG_ALLOC_ORDER
|
||||
#define REG_ALLOC_ORDER \
|
||||
{33, \
|
||||
42, 43, 44, 45, 46, 47, \
|
||||
54, 55, 56, 57, 58, 59, 60, 61, 62, \
|
||||
53, 52, 51, 50, 49, 48, \
|
||||
32, \
|
||||
34, 35, 36, 37, 38, 39, 40, 41, \
|
||||
1, \
|
||||
22, 23, 24, 25, \
|
||||
28, \
|
||||
0, \
|
||||
21, 20, 19, 18, 17, 16, \
|
||||
27, \
|
||||
2, 3, 4, 5, 6, 7, 8, \
|
||||
9, 10, 11, 12, 13, 14, \
|
||||
26, \
|
||||
15, \
|
||||
29, \
|
||||
30, 31, 63 }
|
||||
|
||||
#undef HARD_FRAME_POINTER_REGNUM
|
||||
#define HARD_FRAME_POINTER_REGNUM 29
|
||||
|
||||
/* Define registers used by the epilogue and return instruction. */
|
||||
#undef EPILOGUE_USES
|
||||
#define EPILOGUE_USES(REGNO) ((REGNO) == 26 || (REGNO) == 29)
|
||||
|
||||
#undef CAN_ELIMINATE
|
||||
#define CAN_ELIMINATE(FROM, TO) \
|
||||
((TO) != STACK_POINTER_REGNUM || ! alpha_using_fp ())
|
||||
|
||||
#undef INITIAL_ELIMINATION_OFFSET
|
||||
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
|
||||
{ if ((FROM) == FRAME_POINTER_REGNUM) \
|
||||
(OFFSET) = alpha_sa_size () + alpha_pv_save_size (); \
|
||||
else if ((FROM) == ARG_POINTER_REGNUM) \
|
||||
(OFFSET) = (ALPHA_ROUND (alpha_sa_size () + alpha_pv_save_size () \
|
||||
+ get_frame_size () \
|
||||
+ current_function_pretend_args_size) \
|
||||
- current_function_pretend_args_size); \
|
||||
else \
|
||||
abort(); \
|
||||
if ((TO) == STACK_POINTER_REGNUM) \
|
||||
(OFFSET) += ALPHA_ROUND (current_function_outgoing_args_size); \
|
||||
}
|
||||
|
||||
/* Define a data type for recording info about an argument list
|
||||
during the scan of that argument list. This data type should
|
||||
hold all necessary information about the function itself
|
||||
and about the args processed so far, enough to enable macros
|
||||
such as FUNCTION_ARG to determine where the next arg should go.
|
||||
|
||||
On Alpha/VMS, this is a structure that contains the number of
|
||||
arguments and, for each argument, the datatype of that argument.
|
||||
|
||||
The number of arguments is a number of words of arguments scanned so far.
|
||||
Thus 6 or more means all following args should go on the stack. */
|
||||
|
||||
enum avms_arg_type {I64, FF, FD, FG, FS, FT};
|
||||
typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info;
|
||||
|
||||
#undef CUMULATIVE_ARGS
|
||||
#define CUMULATIVE_ARGS avms_arg_info
|
||||
|
||||
/* Initialize a variable CUM of type CUMULATIVE_ARGS
|
||||
for a call to a function whose data type is FNTYPE.
|
||||
For a library call, FNTYPE is 0. */
|
||||
|
||||
#undef INIT_CUMULATIVE_ARGS
|
||||
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
|
||||
(CUM).num_args = 0; \
|
||||
(CUM).atypes[0] = (CUM).atypes[1] = (CUM).atypes[2] = I64; \
|
||||
(CUM).atypes[3] = (CUM).atypes[4] = (CUM).atypes[5] = I64;
|
||||
|
||||
#undef FUNCTION_ARG_ADVANCE
|
||||
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
|
||||
if (MUST_PASS_IN_STACK (MODE, TYPE)) \
|
||||
(CUM).num_args += 6; \
|
||||
else \
|
||||
{ \
|
||||
if ((CUM).num_args < 6) \
|
||||
(CUM).atypes[(CUM).num_args] = alpha_arg_type (MODE); \
|
||||
\
|
||||
(CUM).num_args += ALPHA_ARG_SIZE (MODE, TYPE, NAMED); \
|
||||
}
|
||||
|
||||
/* For an arg passed partly in registers and partly in memory,
|
||||
this is the number of registers used.
|
||||
For args passed entirely in registers or entirely in memory, zero. */
|
||||
|
||||
#undef FUNCTION_ARG_PARTIAL_NREGS
|
||||
#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
|
||||
((CUM).num_args < 6 && 6 < (CUM).num_args \
|
||||
+ ALPHA_ARG_SIZE (MODE, TYPE, NAMED) \
|
||||
? 6 - (CUM).num_args : 0)
|
||||
|
||||
/* ABI has stack checking, but it's broken. */
|
||||
#undef STACK_CHECK_BUILTIN
|
||||
#define STACK_CHECK_BUILTIN 0
|
||||
|
||||
#define LINK_SECTION_ASM_OP "\t.link"
|
||||
#define READONLY_DATA_SECTION_ASM_OP "\t.rdata"
|
||||
#define LITERALS_SECTION_ASM_OP "\t.literals"
|
||||
#define CTORS_SECTION_ASM_OP "\t.ctors"
|
||||
#define DTORS_SECTION_ASM_OP "\t.dtors"
|
||||
|
||||
#undef EXTRA_SECTIONS
|
||||
#define EXTRA_SECTIONS in_link, in_literals
|
||||
|
||||
#undef EXTRA_SECTION_FUNCTIONS
|
||||
#define EXTRA_SECTION_FUNCTIONS \
|
||||
void \
|
||||
link_section (void) \
|
||||
{ \
|
||||
if (in_section != in_link) \
|
||||
{ \
|
||||
fprintf (asm_out_file, "%s\n", LINK_SECTION_ASM_OP); \
|
||||
in_section = in_link; \
|
||||
} \
|
||||
} \
|
||||
void \
|
||||
literals_section (void) \
|
||||
{ \
|
||||
if (in_section != in_literals) \
|
||||
{ \
|
||||
fprintf (asm_out_file, "%s\n", LITERALS_SECTION_ASM_OP); \
|
||||
in_section = in_literals; \
|
||||
} \
|
||||
}
|
||||
|
||||
extern void link_section (void);
|
||||
extern void literals_section (void);
|
||||
|
||||
#undef ASM_OUTPUT_ADDR_DIFF_ELT
|
||||
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) abort ()
|
||||
|
||||
#undef ASM_OUTPUT_ADDR_VEC_ELT
|
||||
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
|
||||
fprintf (FILE, "\t.quad $L%d\n", (VALUE))
|
||||
|
||||
#undef CASE_VECTOR_MODE
|
||||
#define CASE_VECTOR_MODE DImode
|
||||
#undef CASE_VECTOR_PC_RELATIVE
|
||||
|
||||
#undef ASM_OUTPUT_CASE_LABEL
|
||||
#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \
|
||||
{ ASM_OUTPUT_ALIGN (FILE, 3); (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM); }
|
||||
|
||||
/* This says how to output assembler code to declare an
|
||||
uninitialized external linkage data object. */
|
||||
|
||||
#define COMMON_ASM_OP "\t.comm\t"
|
||||
|
||||
#undef ASM_OUTPUT_ALIGNED_COMMON
|
||||
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
|
||||
do { \
|
||||
fprintf ((FILE), "%s", COMMON_ASM_OP); \
|
||||
assemble_name ((FILE), (NAME)); \
|
||||
fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED ",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* Output assembler code for a block containing the constant parts
|
||||
of a trampoline, leaving space for the variable parts.
|
||||
|
||||
The trampoline should set the static chain pointer to value placed
|
||||
into the trampoline and should branch to the specified routine.
|
||||
Note that $27 has been set to the address of the trampoline, so we can
|
||||
use it for addressability of the two data items. */
|
||||
|
||||
#undef TRAMPOLINE_TEMPLATE
|
||||
#define TRAMPOLINE_TEMPLATE(FILE) \
|
||||
{ \
|
||||
fprintf (FILE, "\t.quad 0\n"); \
|
||||
fprintf (FILE, "\t.linkage __tramp\n"); \
|
||||
fprintf (FILE, "\t.quad 0\n"); \
|
||||
}
|
||||
|
||||
/* Length in units of the trampoline for entering a nested function. */
|
||||
|
||||
#undef TRAMPOLINE_SIZE
|
||||
#define TRAMPOLINE_SIZE 32
|
||||
|
||||
/* The alignment of a trampoline, in bits. */
|
||||
|
||||
#undef TRAMPOLINE_ALIGNMENT
|
||||
#define TRAMPOLINE_ALIGNMENT 64
|
||||
|
||||
/* Emit RTL insns to initialize the variable parts of a trampoline.
|
||||
FNADDR is an RTX for the address of the function's pure code.
|
||||
CXT is an RTX for the static chain value for the function. */
|
||||
|
||||
#undef INITIALIZE_TRAMPOLINE
|
||||
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
|
||||
alpha_initialize_trampoline (TRAMP, FNADDR, CXT, 16, 24, -1)
|
||||
|
||||
/* Control how constructors and destructors are emitted. */
|
||||
#define TARGET_ASM_CONSTRUCTOR vms_asm_out_constructor
|
||||
#define TARGET_ASM_DESTRUCTOR vms_asm_out_destructor
|
||||
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
#undef MIPS_DEBUGGING_INFO
|
||||
#undef DBX_DEBUGGING_INFO
|
||||
|
||||
#define DWARF2_DEBUGGING_INFO 1
|
||||
#define VMS_DEBUGGING_INFO 1
|
||||
|
||||
#define DWARF2_UNWIND_INFO 1
|
||||
|
||||
#undef EH_RETURN_HANDLER_RTX
|
||||
#define EH_RETURN_HANDLER_RTX \
|
||||
gen_rtx_MEM (Pmode, plus_constant (stack_pointer_rtx, 8))
|
||||
|
||||
#define LINK_EH_SPEC "vms-dwarf2eh.o%s "
|
||||
|
||||
#ifdef IN_LIBGCC2
|
||||
#include <pdscdef.h>
|
||||
|
||||
#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \
|
||||
do { \
|
||||
PDSCDEF *pv = *((PDSCDEF **) (CONTEXT)->reg [29]); \
|
||||
\
|
||||
if (pv && ((long) pv & 0x7) == 0) /* low bits 0 means address */ \
|
||||
pv = *(PDSCDEF **) pv; \
|
||||
\
|
||||
if (pv && ((pv->pdsc$w_flags & 0xf) == PDSC$K_KIND_FP_STACK)) \
|
||||
{ \
|
||||
int i, j; \
|
||||
\
|
||||
(FS)->cfa_offset = pv->pdsc$l_size; \
|
||||
(FS)->cfa_reg = pv->pdsc$w_flags & PDSC$M_BASE_REG_IS_FP ? 29 : 30; \
|
||||
(FS)->retaddr_column = 26; \
|
||||
(FS)->cfa_how = CFA_REG_OFFSET; \
|
||||
(FS)->regs.reg[27].loc.offset = -pv->pdsc$l_size; \
|
||||
(FS)->regs.reg[27].how = REG_SAVED_OFFSET; \
|
||||
(FS)->regs.reg[26].loc.offset \
|
||||
= -(pv->pdsc$l_size - pv->pdsc$w_rsa_offset); \
|
||||
(FS)->regs.reg[26].how = REG_SAVED_OFFSET; \
|
||||
\
|
||||
for (i = 0, j = 0; i < 32; i++) \
|
||||
if (1<<i & pv->pdsc$l_ireg_mask) \
|
||||
{ \
|
||||
(FS)->regs.reg[i].loc.offset \
|
||||
= -(pv->pdsc$l_size - pv->pdsc$w_rsa_offset - 8 * ++j); \
|
||||
(FS)->regs.reg[i].how = REG_SAVED_OFFSET; \
|
||||
} \
|
||||
\
|
||||
goto SUCCESS; \
|
||||
} \
|
||||
else if (pv && ((pv->pdsc$w_flags & 0xf) == PDSC$K_KIND_FP_REGISTER)) \
|
||||
{ \
|
||||
(FS)->cfa_offset = pv->pdsc$l_size; \
|
||||
(FS)->cfa_reg = pv->pdsc$w_flags & PDSC$M_BASE_REG_IS_FP ? 29 : 30; \
|
||||
(FS)->retaddr_column = 26; \
|
||||
(FS)->cfa_how = CFA_REG_OFFSET; \
|
||||
(FS)->regs.reg[26].loc.reg = pv->pdsc$b_save_ra; \
|
||||
(FS)->regs.reg[26].how = REG_SAVED_REG; \
|
||||
(FS)->regs.reg[29].loc.reg = pv->pdsc$b_save_fp; \
|
||||
(FS)->regs.reg[29].how = REG_SAVED_REG; \
|
||||
\
|
||||
goto SUCCESS; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
/* This is how to output an assembler line
|
||||
that says to advance the location counter
|
||||
to a multiple of 2**LOG bytes. */
|
||||
|
||||
#undef ASM_OUTPUT_ALIGN
|
||||
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
||||
fprintf (FILE, "\t.align %d\n", LOG);
|
||||
|
||||
/* Switch into a generic section. */
|
||||
#define TARGET_ASM_NAMED_SECTION vms_asm_named_section
|
||||
|
||||
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
|
||||
do { literals_section(); \
|
||||
fprintf ((FILE), "\t"); \
|
||||
assemble_name (FILE, LABEL1); \
|
||||
fprintf (FILE, " = "); \
|
||||
assemble_name (FILE, LABEL2); \
|
||||
fprintf (FILE, "\n"); \
|
||||
} while (0)
|
||||
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
|
||||
|
||||
#define ASM_PN_FORMAT "%s___%lu"
|
||||
|
||||
/* ??? VMS uses different linkage. */
|
||||
#undef TARGET_ASM_OUTPUT_MI_THUNK
|
||||
|
||||
#undef ASM_SPEC
|
||||
#undef ASM_FINAL_SPEC
|
||||
|
||||
/* The VMS convention is to always provide minimal debug info
|
||||
for a traceback unless specifically overridden. Defaulting this here
|
||||
is a kludge. */
|
||||
|
||||
#define OPTIMIZATION_OPTIONS(OPTIMIZE, OPTIMIZE_SIZE) \
|
||||
{ \
|
||||
write_symbols = VMS_DEBUG; \
|
||||
debug_info_level = (enum debug_info_level) 1; \
|
||||
}
|
||||
|
||||
/* Override traceback debug info on -g0. */
|
||||
#undef OVERRIDE_OPTIONS
|
||||
#define OVERRIDE_OPTIONS \
|
||||
{ \
|
||||
if (write_symbols == NO_DEBUG) \
|
||||
debug_info_level = (enum debug_info_level) 0; \
|
||||
override_options (); \
|
||||
}
|
||||
|
||||
/* Link with vms-dwarf2.o if -g (except -g0). This causes the
|
||||
VMS link to pull all the dwarf2 debug sections together. */
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{g:-g vms-dwarf2.o%s} %{g0} %{g1:-g1 vms-dwarf2.o%s} \
|
||||
%{g2:-g2 vms-dwarf2.o%s} %{g3:-g3 vms-dwarf2.o%s} %{shared} %{v} %{map}"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "%{!shared:%{mvms-return-codes:vcrt0.o%s} \
|
||||
%{!mvms-return-codes:pcrt0.o%s}}"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "-lc"
|
||||
|
||||
#define NAME__MAIN "__gccmain"
|
||||
#define SYMBOL__MAIN __gccmain
|
||||
|
||||
#define MD_EXEC_PREFIX "/gnu/lib/gcc-lib/"
|
||||
#define MD_STARTFILE_PREFIX "/gnu/lib/gcc-lib/"
|
||||
|
||||
/* Specify the list of include file directories. */
|
||||
#define INCLUDE_DEFAULTS \
|
||||
{ \
|
||||
{ "/gnu/lib/gcc-lib/include", 0, 0, 0 }, \
|
||||
{ "/gnu_gxx_include", 0, 1, 1 }, \
|
||||
{ "/gnu_cc_include", 0, 0, 0 }, \
|
||||
{ "/gnu/include", 0, 0, 0 }, \
|
||||
{ 0, 0, 0, 0 } \
|
||||
}
|
||||
|
||||
#define LONGLONG_STANDALONE 1
|
@ -1,32 +0,0 @@
|
||||
/* Output variables, constants and external declarations, for GNU compiler.
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
Contributed by Douglas Rupp (rupp@gnat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Defaults to BITS_PER_WORD, e.g. 64 which is what is wanted.
|
||||
This is incompatible with DEC C, but matches DEC Ada */
|
||||
#undef LONG_TYPE_SIZE
|
||||
|
||||
/* Defaults to "long int" */
|
||||
#undef SIZE_TYPE
|
||||
#undef PTRDIFF_TYPE
|
||||
|
||||
#undef POINTERS_EXTEND_UNSIGNED
|
||||
#undef POINTER_SIZE
|
||||
#define POINTER_SIZE 64
|
@ -1,52 +0,0 @@
|
||||
/* VMS trampoline for nested functions
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
Contributed by Douglas B. Rupp (rupp@gnat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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 into combinations with other programs,
|
||||
and to distribute those combinations 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 a combine
|
||||
executable.)
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
;# Alpha OpenVMS trampoline
|
||||
;#
|
||||
.set noreorder
|
||||
.set volatile
|
||||
.set noat
|
||||
.file 1 "vms_tramp.asm"
|
||||
.text
|
||||
.align 3
|
||||
.globl __tramp
|
||||
.ent __tramp
|
||||
__tramp..en:
|
||||
|
||||
.link
|
||||
.align 3
|
||||
__tramp:
|
||||
.pdesc __tramp..en,null
|
||||
.text
|
||||
ldq $1,24($27)
|
||||
ldq $27,16($27)
|
||||
ldq $28,8($27)
|
||||
jmp $31,($28),0
|
||||
.end __tramp
|
@ -1,24 +0,0 @@
|
||||
# Under VMS, directory names cannot contain dots.
|
||||
version:=$(shell echo $(gcc_version) | sed -e 's/\./_/g')
|
||||
|
||||
libsubdir=$(libdir)/gcc-lib
|
||||
|
||||
# Rules for linker and compiler wrappers. These are only useful on
|
||||
# a VMS host.
|
||||
EXTRA_PROGRAMS=ld.exe decc.exe
|
||||
vms-ld.o : $(srcdir)/config/alpha/vms-ld.c
|
||||
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
|
||||
ld.exe : vms-ld.o
|
||||
$(CC) -o $@ vms-ld.o ../libiberty/libiberty.a
|
||||
|
||||
vms-cc.o : $(srcdir)/config/alpha/vms-cc.c
|
||||
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
|
||||
decc.exe : vms-cc.o
|
||||
$(CC) -o $@ vms-cc.o ../libiberty/libiberty.a
|
||||
|
||||
# These extra parts can only be compiled on a VMS host and are only needed
|
||||
# on a VMS target. The rules are in t-vms.
|
||||
VMS_EXTRA_PARTS=vcrt0.o pcrt0.o
|
||||
|
||||
# Doesn't work on VMS
|
||||
USE_COLLECT2=
|
@ -1,45 +0,0 @@
|
||||
/* Configuration for GNU C-compiler for openVMS/Alpha.
|
||||
Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
|
||||
Contributed by Klaus Kaempf (kkaempf@progis.de).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* A couple of conditionals for execution machine are controlled here. */
|
||||
#ifndef VMS
|
||||
#define VMS
|
||||
#endif
|
||||
|
||||
/* Define a local equivalent (sort of) for unlink */
|
||||
#define unlink remove
|
||||
|
||||
/* Causes exit() to be redefined to __posix_exit() and
|
||||
Posix compatible failure and success codes to be used */
|
||||
#define _POSIX_EXIT 1
|
||||
|
||||
/* Open files in stream mode if not otherwise explicitly specified */
|
||||
#define __UNIX_FOPEN 1
|
||||
|
||||
/* Write to stdout using fputc to avoid record terminators in pipes */
|
||||
#define __UNIX_FWRITE 1
|
||||
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
#define HOST_EXECUTABLE_SUFFIX ".exe"
|
||||
#define HOST_OBJECT_SUFFIX ".obj"
|
||||
|
||||
#define DUMPFILE_FORMAT "_%02d_"
|
@ -1,54 +0,0 @@
|
||||
/* Move double-word library function.
|
||||
Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Red Hat, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; 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. */
|
||||
|
||||
void
|
||||
__cmovd (long long *dest, const long long *src, unsigned len)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned num = len >> 3;
|
||||
unsigned xlen = len & ~7;
|
||||
char *dest_byte = (char *)dest;
|
||||
const char *src_byte = (const char *)src;
|
||||
|
||||
if (dest_byte < src_byte || dest_byte > src_byte+len)
|
||||
{
|
||||
for (i = 0; i < num; i++)
|
||||
dest[i] = src[i];
|
||||
|
||||
while (len > xlen)
|
||||
{
|
||||
dest_byte[xlen] = src_byte[xlen];
|
||||
xlen++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (len-- > 0)
|
||||
dest_byte[len] = src_byte[len];
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
/* Move half-word library function.
|
||||
Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Red Hat, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; 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. */
|
||||
|
||||
void
|
||||
__cmovh (short *dest, const short *src, unsigned len)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned num = len >> 1;
|
||||
char *dest_byte = (char *)dest;
|
||||
const char *src_byte = (const char *)src;
|
||||
|
||||
if (dest_byte < src_byte || dest_byte > src_byte+len)
|
||||
{
|
||||
for (i = 0; i < num; i++)
|
||||
dest[i] = src[i];
|
||||
|
||||
if ((len & 1) != 0)
|
||||
dest_byte[len-1] = src_byte[len-1];
|
||||
}
|
||||
else
|
||||
{
|
||||
while (len-- > 0)
|
||||
dest_byte[len] = src_byte[len];
|
||||
}
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
/* Move word library function.
|
||||
Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Red Hat, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; 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. */
|
||||
|
||||
void
|
||||
__cmovw (int *dest, const int *src, unsigned len)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned num = len >> 2;
|
||||
unsigned xlen = len & ~3;
|
||||
char *dest_byte = (char *)dest;
|
||||
const char *src_byte = (const char *)src;
|
||||
|
||||
if (dest_byte < src_byte || dest_byte > src_byte+len)
|
||||
{
|
||||
for (i = 0; i < num; i++)
|
||||
dest[i] = src[i];
|
||||
|
||||
while (len > xlen)
|
||||
{
|
||||
dest_byte[xlen] = src_byte[xlen];
|
||||
xlen++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (len-- > 0)
|
||||
dest_byte[len] = src_byte[len];
|
||||
}
|
||||
}
|
@ -1,181 +0,0 @@
|
||||
/* Frv map GCC names to FR-V ABI.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Contributed by Red Hat, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* For each of the functions in the library that has a corresponding name in
|
||||
the ABI, add an equivalence between the GCC name and the ABI name. This is
|
||||
in a separate file from frv.h so that fp-bit.c can be made to include it. */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifdef __FRV_UNDERSCORE__
|
||||
#define RENAME_LIBRARY(OLD,NEW) \
|
||||
__asm__ (".globl\t_" #NEW "\n" \
|
||||
"_" #NEW "=_" #OLD "\n" \
|
||||
"\t.type\t_" #NEW ",@function\n");
|
||||
|
||||
#else
|
||||
#define RENAME_LIBRARY(OLD,NEW) \
|
||||
__asm__ (".globl\t" #NEW "\n" \
|
||||
#NEW "=" #OLD "\n" \
|
||||
"\t.type\t" #NEW ",@function\n");
|
||||
#endif
|
||||
|
||||
#define CREATE_DOUBLE_SHIFT(OLD,NEW) \
|
||||
__asm__ (".text\n" \
|
||||
"\t.globl\t" #NEW "\n" \
|
||||
"\t.type\t" #NEW ",@function\n" \
|
||||
#NEW ":\n" \
|
||||
"\tor\tgr11, gr0, gr10\n" \
|
||||
"\tbra\t" #OLD "\n");
|
||||
|
||||
#ifdef L_sf_to_df
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__extendsfdf2,__ftod)
|
||||
#endif
|
||||
|
||||
#ifdef L_sf_to_si
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfsi,__ftoi)
|
||||
#endif
|
||||
|
||||
#ifdef L_sf_to_usi
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui)
|
||||
#endif
|
||||
|
||||
#ifdef L_df_to_si
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfsi,__dtoi)
|
||||
#endif
|
||||
|
||||
#ifdef L_fixunssfsi
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui)
|
||||
#endif
|
||||
|
||||
#ifdef L_fixunsdfsi
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfsi,__dtoui)
|
||||
#endif
|
||||
|
||||
#ifdef L_fixsfdi
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfdi,__ftoll)
|
||||
#endif
|
||||
|
||||
#ifdef L_fixdfdi
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfdi,__dtoll)
|
||||
#endif
|
||||
|
||||
#ifdef L_fixunssfdi
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfdi,__ftoull)
|
||||
#endif
|
||||
|
||||
#ifdef L_fixunsdfdi
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfdi,__dtoull)
|
||||
#endif
|
||||
|
||||
#ifdef L_si_to_sf
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsisf,__itof)
|
||||
#endif
|
||||
|
||||
#ifdef L_di_to_sf
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof)
|
||||
#endif
|
||||
|
||||
#ifdef L_df_to_sf
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__truncdfsf2,__dtof)
|
||||
#endif
|
||||
|
||||
#ifdef L_si_to_df
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsidf,__itod)
|
||||
#endif
|
||||
|
||||
#ifdef L_floatdisf
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof)
|
||||
#endif
|
||||
|
||||
#ifdef L_floatdidf
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdidf,__lltod)
|
||||
#endif
|
||||
|
||||
#ifdef L_addsub_df
|
||||
#define DECLARE_LIBRARY_RENAMES \
|
||||
RENAME_LIBRARY(__adddf3,__addd)
|
||||
RENAME_LIBRARY(__subdf3,__subd)
|
||||
#endif
|
||||
|
||||
#ifdef L_mul_df
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__muldf3,__muld)
|
||||
#endif
|
||||
|
||||
#ifdef L_div_df
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdf3,__divd)
|
||||
#endif
|
||||
|
||||
#ifdef L_addsub_sf
|
||||
#define DECLARE_LIBRARY_RENAMES \
|
||||
RENAME_LIBRARY(__addsf3,__addf) \
|
||||
RENAME_LIBRARY(__subsf3,__subf)
|
||||
#endif
|
||||
|
||||
#ifdef L_mul_sf
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__mulsf3,__mulf)
|
||||
#endif
|
||||
|
||||
#ifdef L_div_sf
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divsf3,__divf)
|
||||
#endif
|
||||
|
||||
#ifdef L_ashldi3
|
||||
#define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashldi3,__sllll)
|
||||
#endif
|
||||
|
||||
#ifdef L_lshrdi3
|
||||
#define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__lshrdi3,__srlll)
|
||||
#endif
|
||||
|
||||
#ifdef L_ashrdi3
|
||||
#define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashrdi3,__srall)
|
||||
#endif
|
||||
|
||||
#ifdef L_adddi3
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__adddi3,__addll)
|
||||
#endif
|
||||
|
||||
#ifdef L_subdi3
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__subdi3,__subll)
|
||||
#endif
|
||||
|
||||
#ifdef L_muldi3
|
||||
#define DECLARE_LIBRARY_RENAMES \
|
||||
RENAME_LIBRARY(__muldi3,__mulll)
|
||||
RENAME_LIBRARY(__muldi3,__umulll)
|
||||
#endif
|
||||
|
||||
#ifdef L_divdi3
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdi3,__divll)
|
||||
#endif
|
||||
|
||||
#ifdef L_udivdi3
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__udivdi3,__udivll)
|
||||
#endif
|
||||
|
||||
#ifdef L_moddi3
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__moddi3,__modll)
|
||||
#endif
|
||||
|
||||
#ifdef L_umoddi3
|
||||
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__umoddi3,__umodll)
|
||||
#endif
|
||||
#endif /* __GNUC__ */
|
@ -1,49 +0,0 @@
|
||||
/* Assembler Support.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Contributed by Red Hat, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* P(INSN): Emit INSN.P for VLIW machines, otherwise emit plain INSN.
|
||||
P2(INSN): Emit INSN.P on the FR500 and above, otherwise emit plain INSN. */
|
||||
#ifdef __FRV_VLIW__
|
||||
#ifdef __STDC__
|
||||
#define P(A) A.p
|
||||
#else
|
||||
#define P(A) A/**/.p
|
||||
#endif
|
||||
#if __FRV_VLIW__ > 2
|
||||
#define P2(A) P(A)
|
||||
#else
|
||||
#define P2(A) A
|
||||
#endif
|
||||
#else
|
||||
#define P(A) A
|
||||
#define P2(A) A
|
||||
#endif
|
||||
|
||||
/* Add underscore if necessary to external name. */
|
||||
#ifdef __FRV_UNDERSCORE__
|
||||
#ifdef __STDC__
|
||||
#define EXT(NAME) _##NAME
|
||||
#else
|
||||
#define EXT(NAME) _/**/NAME
|
||||
#endif
|
||||
#else
|
||||
#define EXT(NAME) NAME
|
||||
#endif
|
@ -1,30 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler for FRV.
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* On the FRV, the CC modes used are:
|
||||
|
||||
CCmode set ICC's from comparing signed integers
|
||||
CC_UNSmode set ICC's from comparing unsigned integers
|
||||
CC_FPmode set FCC's from comparing floating point
|
||||
CC_CCRmode set CCR's to do conditional execution */
|
||||
|
||||
CC_MODE (CC_UNS);
|
||||
CC_MODE (CC_FP);
|
||||
CC_MODE (CC_CCR);
|
@ -1,238 +0,0 @@
|
||||
/* Frv prototypes.
|
||||
Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Red Hat, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Define the information needed to generate branch and scc insns. This is
|
||||
stored from the compare operation. Note that we can't use "rtx" here
|
||||
since it hasn't been defined! */
|
||||
|
||||
/* Define global data defined in frv.c. */
|
||||
extern const char *frv_branch_cost_string; /* -mbranch-cost option */
|
||||
extern int frv_branch_cost_int; /* value of -mbranch_cost */
|
||||
|
||||
extern const char *frv_cpu_string; /* -mcpu= option */
|
||||
|
||||
extern const char *frv_condexec_insns_str; /* -mcond-exec-insns= option */
|
||||
extern int frv_condexec_insns; /* value of -mcond-exec-insns */
|
||||
|
||||
extern const char *frv_condexec_temps_str; /* -mcond-exec-temps= option */
|
||||
extern int frv_condexec_temps; /* value of -mcond-exec-temps */
|
||||
|
||||
extern const char *frv_sched_lookahead_str; /* -msched-lookahead= option */
|
||||
extern int frv_sched_lookahead; /* value -msched-lookahead= */
|
||||
|
||||
/* CPU type. This must be identical to the cpu enumeration in frv.md. */
|
||||
typedef enum frv_cpu
|
||||
{
|
||||
FRV_CPU_GENERIC,
|
||||
FRV_CPU_FR500,
|
||||
FRV_CPU_FR400,
|
||||
FRV_CPU_FR300,
|
||||
FRV_CPU_SIMPLE,
|
||||
FRV_CPU_TOMCAT
|
||||
} frv_cpu_t;
|
||||
|
||||
extern frv_cpu_t frv_cpu_type; /* value of -mcpu= */
|
||||
|
||||
/* Define functions defined in frv.c */
|
||||
extern void frv_expand_prologue (void);
|
||||
extern void frv_expand_epilogue (int);
|
||||
extern void frv_override_options (void);
|
||||
extern void frv_optimization_options (int, int);
|
||||
extern void frv_conditional_register_usage (void);
|
||||
extern frv_stack_t *frv_stack_info (void);
|
||||
extern void frv_debug_stack (frv_stack_t *);
|
||||
extern int frv_frame_pointer_required (void);
|
||||
extern int frv_initial_elimination_offset (int, int);
|
||||
|
||||
#ifdef RTX_CODE
|
||||
extern int frv_legitimate_address_p (enum machine_mode, rtx,
|
||||
int, int);
|
||||
extern rtx frv_legitimize_address (rtx, rtx, enum machine_mode);
|
||||
|
||||
#ifdef TREE_CODE
|
||||
extern void frv_init_cumulative_args (CUMULATIVE_ARGS *, tree,
|
||||
rtx, tree, int);
|
||||
|
||||
extern int frv_function_arg_boundary (enum machine_mode, tree);
|
||||
extern rtx frv_function_arg (CUMULATIVE_ARGS *,
|
||||
enum machine_mode,
|
||||
tree, int, int);
|
||||
|
||||
extern void frv_function_arg_advance (CUMULATIVE_ARGS *,
|
||||
enum machine_mode,
|
||||
tree, int);
|
||||
|
||||
extern int frv_function_arg_partial_nregs (CUMULATIVE_ARGS *,
|
||||
enum machine_mode,
|
||||
tree, int);
|
||||
|
||||
extern int frv_function_arg_pass_by_reference (CUMULATIVE_ARGS *,
|
||||
enum machine_mode,
|
||||
tree, int);
|
||||
|
||||
extern int frv_function_arg_callee_copies (CUMULATIVE_ARGS *,
|
||||
enum machine_mode,
|
||||
tree, int);
|
||||
|
||||
extern int frv_function_arg_keep_as_reference (CUMULATIVE_ARGS *,
|
||||
enum machine_mode,
|
||||
tree, int);
|
||||
|
||||
extern rtx frv_expand_builtin_saveregs (void);
|
||||
extern void frv_setup_incoming_varargs (CUMULATIVE_ARGS *,
|
||||
enum machine_mode,
|
||||
tree, int *, int);
|
||||
|
||||
extern void frv_expand_builtin_va_start (tree, rtx);
|
||||
extern rtx frv_expand_builtin_va_arg (tree, tree);
|
||||
#endif /* TREE_CODE */
|
||||
|
||||
extern int frv_expand_block_move (rtx *);
|
||||
extern int frv_expand_block_clear (rtx *);
|
||||
extern rtx frv_dynamic_chain_address (rtx);
|
||||
extern rtx frv_return_addr_rtx (int, rtx);
|
||||
extern rtx frv_index_memory (rtx, enum machine_mode, int);
|
||||
extern const char *frv_asm_output_opcode
|
||||
(FILE *, const char *);
|
||||
extern void frv_final_prescan_insn (rtx, rtx *, int);
|
||||
extern void frv_print_operand (FILE *, rtx, int);
|
||||
extern void frv_print_operand_address (FILE *, rtx);
|
||||
extern int frv_emit_movsi (rtx, rtx);
|
||||
extern const char *output_move_single (rtx *, rtx);
|
||||
extern const char *output_move_double (rtx *, rtx);
|
||||
extern const char *output_condmove_single
|
||||
(rtx *, rtx);
|
||||
extern int frv_emit_cond_branch (enum rtx_code, rtx);
|
||||
extern int frv_emit_scc (enum rtx_code, rtx);
|
||||
extern rtx frv_split_scc (rtx, rtx, rtx, rtx, HOST_WIDE_INT);
|
||||
extern int frv_emit_cond_move (rtx, rtx, rtx, rtx);
|
||||
extern rtx frv_split_cond_move (rtx *);
|
||||
extern rtx frv_split_minmax (rtx *);
|
||||
extern rtx frv_split_abs (rtx *);
|
||||
extern void frv_split_double_load (rtx, rtx);
|
||||
extern void frv_split_double_store (rtx, rtx);
|
||||
#ifdef BLOCK_HEAD
|
||||
extern void frv_ifcvt_init_extra_fields (ce_if_block_t *);
|
||||
extern void frv_ifcvt_modify_tests (ce_if_block_t *, rtx *, rtx *);
|
||||
extern void frv_ifcvt_modify_multiple_tests
|
||||
(ce_if_block_t *, basic_block,
|
||||
rtx *, rtx *);
|
||||
extern rtx frv_ifcvt_modify_insn (ce_if_block_t *, rtx, rtx);
|
||||
extern void frv_ifcvt_modify_final (ce_if_block_t *);
|
||||
extern void frv_ifcvt_modify_cancel (ce_if_block_t *);
|
||||
#endif
|
||||
extern int frv_trampoline_size (void);
|
||||
extern void frv_initialize_trampoline (rtx, rtx, rtx);
|
||||
extern enum reg_class frv_secondary_reload_class
|
||||
(enum reg_class class,
|
||||
enum machine_mode mode,
|
||||
rtx x, int);
|
||||
extern int frv_class_likely_spilled_p (enum reg_class class);
|
||||
extern int frv_hard_regno_mode_ok (int, enum machine_mode);
|
||||
extern int frv_hard_regno_nregs (int, enum machine_mode);
|
||||
extern int frv_class_max_nregs (enum reg_class class,
|
||||
enum machine_mode mode);
|
||||
extern int frv_legitimate_constant_p (rtx);
|
||||
#endif /* RTX_CODE */
|
||||
|
||||
extern int direct_return_p (void);
|
||||
extern int frv_register_move_cost (enum reg_class, enum reg_class);
|
||||
|
||||
#ifdef TREE_CODE
|
||||
extern int frv_adjust_field_align (tree, int);
|
||||
#endif
|
||||
|
||||
extern void fixup_section (void);
|
||||
extern void sdata_section (void);
|
||||
extern void sbss_section (void);
|
||||
extern void data_section (void);
|
||||
|
||||
#ifdef RTX_CODE
|
||||
extern int integer_register_operand (rtx, enum machine_mode);
|
||||
extern int frv_load_operand (rtx, enum machine_mode);
|
||||
extern int gpr_or_fpr_operand (rtx, enum machine_mode);
|
||||
extern int gpr_no_subreg_operand (rtx, enum machine_mode);
|
||||
extern int gpr_or_int6_operand (rtx, enum machine_mode);
|
||||
extern int fpr_or_int6_operand (rtx, enum machine_mode);
|
||||
extern int gpr_or_int_operand (rtx, enum machine_mode);
|
||||
extern int gpr_or_int12_operand (rtx, enum machine_mode);
|
||||
extern int gpr_fpr_or_int12_operand (rtx, enum machine_mode);
|
||||
extern int gpr_or_int10_operand (rtx, enum machine_mode);
|
||||
extern int move_source_operand (rtx, enum machine_mode);
|
||||
extern int move_destination_operand (rtx, enum machine_mode);
|
||||
extern int condexec_source_operand (rtx, enum machine_mode);
|
||||
extern int condexec_dest_operand (rtx, enum machine_mode);
|
||||
extern int lr_operand (rtx, enum machine_mode);
|
||||
extern int gpr_or_memory_operand (rtx, enum machine_mode);
|
||||
extern int fpr_or_memory_operand (rtx, enum machine_mode);
|
||||
extern int reg_or_0_operand (rtx, enum machine_mode);
|
||||
extern int fcc_operand (rtx, enum machine_mode);
|
||||
extern int icc_operand (rtx, enum machine_mode);
|
||||
extern int cc_operand (rtx, enum machine_mode);
|
||||
extern int fcr_operand (rtx, enum machine_mode);
|
||||
extern int icr_operand (rtx, enum machine_mode);
|
||||
extern int cr_operand (rtx, enum machine_mode);
|
||||
extern int call_operand (rtx, enum machine_mode);
|
||||
extern int fpr_operand (rtx, enum machine_mode);
|
||||
extern int even_reg_operand (rtx, enum machine_mode);
|
||||
extern int odd_reg_operand (rtx, enum machine_mode);
|
||||
extern int even_gpr_operand (rtx, enum machine_mode);
|
||||
extern int odd_gpr_operand (rtx, enum machine_mode);
|
||||
extern int quad_fpr_operand (rtx, enum machine_mode);
|
||||
extern int even_fpr_operand (rtx, enum machine_mode);
|
||||
extern int odd_fpr_operand (rtx, enum machine_mode);
|
||||
extern int dbl_memory_one_insn_operand (rtx, enum machine_mode);
|
||||
extern int dbl_memory_two_insn_operand (rtx, enum machine_mode);
|
||||
extern int int12_operand (rtx, enum machine_mode);
|
||||
extern int int6_operand (rtx, enum machine_mode);
|
||||
extern int int5_operand (rtx, enum machine_mode);
|
||||
extern int uint5_operand (rtx, enum machine_mode);
|
||||
extern int uint4_operand (rtx, enum machine_mode);
|
||||
extern int uint1_operand (rtx, enum machine_mode);
|
||||
extern int int_2word_operand (rtx, enum machine_mode);
|
||||
extern int pic_register_operand (rtx, enum machine_mode);
|
||||
extern int pic_symbolic_operand (rtx, enum machine_mode);
|
||||
extern int small_data_register_operand (rtx, enum machine_mode);
|
||||
extern int small_data_symbolic_operand (rtx, enum machine_mode);
|
||||
extern int upper_int16_operand (rtx, enum machine_mode);
|
||||
extern int uint16_operand (rtx, enum machine_mode);
|
||||
extern int relational_operator (rtx, enum machine_mode);
|
||||
extern int signed_relational_operator (rtx, enum machine_mode);
|
||||
extern int unsigned_relational_operator (rtx, enum machine_mode);
|
||||
extern int float_relational_operator (rtx, enum machine_mode);
|
||||
extern int ccr_eqne_operator (rtx, enum machine_mode);
|
||||
extern int minmax_operator (rtx, enum machine_mode);
|
||||
extern int condexec_si_binary_operator (rtx, enum machine_mode);
|
||||
extern int condexec_si_media_operator (rtx, enum machine_mode);
|
||||
extern int condexec_si_divide_operator (rtx, enum machine_mode);
|
||||
extern int condexec_si_unary_operator (rtx, enum machine_mode);
|
||||
extern int condexec_sf_conv_operator (rtx, enum machine_mode);
|
||||
extern int condexec_sf_add_operator (rtx, enum machine_mode);
|
||||
extern int condexec_memory_operand (rtx, enum machine_mode);
|
||||
extern int intop_compare_operator (rtx, enum machine_mode);
|
||||
extern int condexec_intop_cmp_operator (rtx, enum machine_mode);
|
||||
extern int acc_operand (rtx, enum machine_mode);
|
||||
extern int even_acc_operand (rtx, enum machine_mode);
|
||||
extern int quad_acc_operand (rtx, enum machine_mode);
|
||||
extern int accg_operand (rtx, enum machine_mode);
|
||||
extern rtx frv_matching_accg_for_acc (rtx);
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,157 +0,0 @@
|
||||
/* Frv initialization file linked before all user modules
|
||||
Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Red Hat, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
This file was originally taken from the file crtstuff.c in the
|
||||
main compiler directory, and simplified. */
|
||||
|
||||
/* 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. */
|
||||
|
||||
#include "defaults.h"
|
||||
#include <stddef.h>
|
||||
#include "unwind-dw2-fde.h"
|
||||
#include "gbl-ctors.h"
|
||||
|
||||
/* Declare a pointer to void function type. */
|
||||
#define STATIC static
|
||||
|
||||
#ifdef __FRV_UNDERSCORE__
|
||||
#define UNDERSCORE "_"
|
||||
#else
|
||||
#define UNDERSCORE ""
|
||||
#endif
|
||||
|
||||
#define INIT_SECTION_NEG_ONE(SECTION, FLAGS, NAME) \
|
||||
__asm__ (".section " SECTION "," FLAGS "\n\t" \
|
||||
".globl " UNDERSCORE NAME "\n\t" \
|
||||
".type " UNDERSCORE NAME ",@object\n\t" \
|
||||
".p2align 2\n" \
|
||||
UNDERSCORE NAME ":\n\t" \
|
||||
".word -1\n\t" \
|
||||
".previous")
|
||||
|
||||
#define INIT_SECTION(SECTION, FLAGS, NAME) \
|
||||
__asm__ (".section " SECTION "," FLAGS "\n\t" \
|
||||
".globl " UNDERSCORE NAME "\n\t" \
|
||||
".type " UNDERSCORE NAME ",@object\n\t" \
|
||||
".p2align 2\n" \
|
||||
UNDERSCORE NAME ":\n\t" \
|
||||
".previous")
|
||||
|
||||
/* Beginning of .ctor/.dtor sections that provides a list of constructors and
|
||||
destructors to run. */
|
||||
|
||||
INIT_SECTION_NEG_ONE (".ctors", "\"aw\"", "__CTOR_LIST__");
|
||||
INIT_SECTION_NEG_ONE (".dtors", "\"aw\"", "__DTOR_LIST__");
|
||||
|
||||
/* Beginning of .eh_frame section that provides all of the exception handling
|
||||
tables. */
|
||||
|
||||
INIT_SECTION (".eh_frame", "\"aw\"", "__EH_FRAME_BEGIN__");
|
||||
|
||||
/* Beginning of .rofixup section that provides a list of pointers that we
|
||||
need to adjust. */
|
||||
|
||||
INIT_SECTION (".rofixup", "\"a\"", "__ROFIXUP_LIST__");
|
||||
|
||||
extern void __frv_register_eh(void) __attribute__((__constructor__));
|
||||
extern void __frv_deregister_eh(void) __attribute__((__destructor__));
|
||||
|
||||
extern func_ptr __EH_FRAME_BEGIN__[];
|
||||
|
||||
/* Register the exception handling table as the first constructor. */
|
||||
void
|
||||
__frv_register_eh (void)
|
||||
{
|
||||
static struct object object;
|
||||
if (__register_frame_info)
|
||||
__register_frame_info (__EH_FRAME_BEGIN__, &object);
|
||||
}
|
||||
|
||||
/* Note, do not declare __{,de}register_frame_info weak as it seems
|
||||
to interfere with the pic support. */
|
||||
|
||||
/* Unregister the exception handling table as a deconstructor. */
|
||||
void
|
||||
__frv_deregister_eh (void)
|
||||
{
|
||||
static int completed = 0;
|
||||
|
||||
if (completed)
|
||||
return;
|
||||
|
||||
if (__deregister_frame_info)
|
||||
__deregister_frame_info (__EH_FRAME_BEGIN__);
|
||||
|
||||
completed = 1;
|
||||
}
|
||||
|
||||
/* Run the global destructors. */
|
||||
void
|
||||
__do_global_dtors (void)
|
||||
{
|
||||
static func_ptr *p = __DTOR_LIST__ + 1;
|
||||
while (*p)
|
||||
{
|
||||
p++;
|
||||
(*(p-1)) ();
|
||||
}
|
||||
}
|
||||
|
||||
/* Run the global constructors. */
|
||||
void
|
||||
__do_global_ctors (void)
|
||||
{
|
||||
unsigned long nptrs = (unsigned long) __CTOR_LIST__[0];
|
||||
unsigned i;
|
||||
|
||||
if (nptrs == (unsigned long)-1)
|
||||
for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++);
|
||||
|
||||
for (i = nptrs; i >= 1; i--)
|
||||
__CTOR_LIST__[i] ();
|
||||
|
||||
atexit (__do_global_dtors);
|
||||
}
|
||||
|
||||
/* Subroutine called automatically by `main'.
|
||||
Compiling a global function named `main'
|
||||
produces an automatic call to this function at the beginning.
|
||||
|
||||
For many systems, this routine calls __do_global_ctors.
|
||||
For systems which support a .init section we use the .init section
|
||||
to run __do_global_ctors, so we need not do anything here. */
|
||||
|
||||
void
|
||||
__main (void)
|
||||
{
|
||||
/* Support recursive calls to `main': run initializers just once. */
|
||||
static int initialized;
|
||||
if (! initialized)
|
||||
{
|
||||
initialized = 1;
|
||||
__do_global_ctors ();
|
||||
}
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
/* Frv initialization file linked after all user modules
|
||||
Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Red Hat, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; 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. */
|
||||
|
||||
#include "defaults.h"
|
||||
#include <stddef.h>
|
||||
#include "unwind-dw2-fde.h"
|
||||
|
||||
#ifdef __FRV_UNDERSCORE__
|
||||
#define UNDERSCORE "_"
|
||||
#else
|
||||
#define UNDERSCORE ""
|
||||
#endif
|
||||
|
||||
#define FINI_SECTION_ZERO(SECTION, FLAGS, NAME) \
|
||||
__asm__ (".section " SECTION "," FLAGS "\n\t" \
|
||||
".globl " UNDERSCORE NAME "\n\t" \
|
||||
".type " UNDERSCORE NAME ",@object\n\t" \
|
||||
".p2align 2\n" \
|
||||
UNDERSCORE NAME ":\n\t" \
|
||||
".word 0\n\t" \
|
||||
".previous")
|
||||
|
||||
#define FINI_SECTION(SECTION, FLAGS, NAME) \
|
||||
__asm__ (".section " SECTION "," FLAGS "\n\t" \
|
||||
".globl " UNDERSCORE NAME "\n\t" \
|
||||
".type " UNDERSCORE NAME ",@object\n\t" \
|
||||
".p2align 2\n" \
|
||||
UNDERSCORE NAME ":\n\t" \
|
||||
".previous")
|
||||
|
||||
/* End of .ctor/.dtor sections that provides a list of constructors and
|
||||
destructors to run. */
|
||||
|
||||
FINI_SECTION_ZERO (".ctors", "\"aw\"", "__CTOR_END__");
|
||||
FINI_SECTION_ZERO (".dtors", "\"aw\"", "__DTOR_END__");
|
||||
|
||||
/* End of .eh_frame section that provides all of the exception handling
|
||||
tables. */
|
||||
|
||||
FINI_SECTION_ZERO (".eh_frame", "\"aw\"", "__FRAME_END__");
|
||||
|
||||
/* End of .rofixup section that provides a list of pointers that we
|
||||
need to adjust. */
|
||||
|
||||
FINI_SECTION (".rofixup", "\"a\"", "__ROFIXUP_END__");
|
@ -1,282 +0,0 @@
|
||||
/* Library functions.
|
||||
Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Red Hat, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; 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. */
|
||||
|
||||
#include <frv-asm.h>
|
||||
|
||||
|
||||
#ifdef L_cmpll
|
||||
/* icc0 = __cmpll (long long a, long long b) */
|
||||
|
||||
.file "_cmpll.s"
|
||||
.globl EXT(__cmpll)
|
||||
.type EXT(__cmpll),@function
|
||||
.text
|
||||
.p2align 4
|
||||
EXT(__cmpll):
|
||||
cmp gr8, gr10, icc0
|
||||
ckeq icc0, cc4
|
||||
P(ccmp) gr9, gr11, cc4, 1
|
||||
ret
|
||||
.Lend:
|
||||
.size EXT(__cmpll),.Lend-EXT(__cmpll)
|
||||
#endif /* L_cmpll */
|
||||
|
||||
#ifdef L_cmpf
|
||||
/* icc0 = __cmpf (float a, float b) */
|
||||
/* Note, because this function returns the result in ICC0, it means it can't
|
||||
handle NaNs. */
|
||||
|
||||
.file "_cmpf.s"
|
||||
.globl EXT(__cmpf)
|
||||
.type EXT(__cmpf),@function
|
||||
.text
|
||||
.p2align 4
|
||||
EXT(__cmpf):
|
||||
#ifdef __FRV_HARD_FLOAT__ /* floating point instructions available */
|
||||
movgf gr8, fr0
|
||||
P(movgf) gr9, fr1
|
||||
setlos #1, gr8
|
||||
fcmps fr0, fr1, fcc0
|
||||
P(fcklt) fcc0, cc0
|
||||
fckeq fcc0, cc1
|
||||
csub gr0, gr8, gr8, cc0, 1
|
||||
cmov gr0, gr8, cc1, 1
|
||||
cmpi gr8, 0, icc0
|
||||
ret
|
||||
#else /* no floating point instructions available */
|
||||
movsg lr, gr4
|
||||
addi sp, #-16, sp
|
||||
sti gr4, @(sp, 8)
|
||||
st fp, @(sp, gr0)
|
||||
mov sp, fp
|
||||
call EXT(__cmpsf2)
|
||||
cmpi gr8, #0, icc0
|
||||
ldi @(sp, 8), gr4
|
||||
movgs gr4, lr
|
||||
ld @(sp,gr0), fp
|
||||
addi sp, #16, sp
|
||||
ret
|
||||
#endif
|
||||
.Lend:
|
||||
.size EXT(__cmpf),.Lend-EXT(__cmpf)
|
||||
#endif
|
||||
|
||||
#ifdef L_cmpd
|
||||
/* icc0 = __cmpd (double a, double b) */
|
||||
/* Note, because this function returns the result in ICC0, it means it can't
|
||||
handle NaNs. */
|
||||
|
||||
.file "_cmpd.s"
|
||||
.globl EXT(__cmpd)
|
||||
.type EXT(__cmpd),@function
|
||||
.text
|
||||
.p2align 4
|
||||
EXT(__cmpd):
|
||||
movsg lr, gr4
|
||||
addi sp, #-16, sp
|
||||
sti gr4, @(sp, 8)
|
||||
st fp, @(sp, gr0)
|
||||
mov sp, fp
|
||||
call EXT(__cmpdf2)
|
||||
cmpi gr8, #0, icc0
|
||||
ldi @(sp, 8), gr4
|
||||
movgs gr4, lr
|
||||
ld @(sp,gr0), fp
|
||||
addi sp, #16, sp
|
||||
ret
|
||||
.Lend:
|
||||
.size EXT(__cmpd),.Lend-EXT(__cmpd)
|
||||
#endif
|
||||
|
||||
#ifdef L_addll
|
||||
/* gr8,gr9 = __addll (long long a, long long b) */
|
||||
/* Note, gcc will never call this function, but it is present in case an
|
||||
ABI program calls it. */
|
||||
|
||||
.file "_addll.s"
|
||||
.globl EXT(__addll)
|
||||
.type EXT(__addll),@function
|
||||
.text
|
||||
.p2align
|
||||
EXT(__addll):
|
||||
addcc gr9, gr11, gr9, icc0
|
||||
addx gr8, gr10, gr8, icc0
|
||||
ret
|
||||
.Lend:
|
||||
.size EXT(__addll),.Lend-EXT(__addll)
|
||||
#endif
|
||||
|
||||
#ifdef L_subll
|
||||
/* gr8,gr9 = __subll (long long a, long long b) */
|
||||
/* Note, gcc will never call this function, but it is present in case an
|
||||
ABI program calls it. */
|
||||
|
||||
.file "_subll.s"
|
||||
.globl EXT(__subll)
|
||||
.type EXT(__subll),@function
|
||||
.text
|
||||
.p2align 4
|
||||
EXT(__subll):
|
||||
subcc gr9, gr11, gr9, icc0
|
||||
subx gr8, gr10, gr8, icc0
|
||||
ret
|
||||
.Lend:
|
||||
.size EXT(__subll),.Lend-EXT(__subll)
|
||||
#endif
|
||||
|
||||
#ifdef L_andll
|
||||
/* gr8,gr9 = __andll (long long a, long long b) */
|
||||
/* Note, gcc will never call this function, but it is present in case an
|
||||
ABI program calls it. */
|
||||
|
||||
.file "_andll.s"
|
||||
.globl EXT(__andll)
|
||||
.type EXT(__andll),@function
|
||||
.text
|
||||
.p2align 4
|
||||
EXT(__andll):
|
||||
P(and) gr9, gr11, gr9
|
||||
P2(and) gr8, gr10, gr8
|
||||
ret
|
||||
.Lend:
|
||||
.size EXT(__andll),.Lend-EXT(__andll)
|
||||
#endif
|
||||
|
||||
#ifdef L_orll
|
||||
/* gr8,gr9 = __orll (long long a, long long b) */
|
||||
/* Note, gcc will never call this function, but it is present in case an
|
||||
ABI program calls it. */
|
||||
|
||||
.file "_orll.s"
|
||||
.globl EXT(__orll)
|
||||
.type EXT(__orll),@function
|
||||
.text
|
||||
.p2align 4
|
||||
EXT(__orll):
|
||||
P(or) gr9, gr11, gr9
|
||||
P2(or) gr8, gr10, gr8
|
||||
ret
|
||||
.Lend:
|
||||
.size EXT(__orll),.Lend-EXT(__orll)
|
||||
#endif
|
||||
|
||||
#ifdef L_xorll
|
||||
/* gr8,gr9 = __xorll (long long a, long long b) */
|
||||
/* Note, gcc will never call this function, but it is present in case an
|
||||
ABI program calls it. */
|
||||
|
||||
.file "_xorll.s"
|
||||
.globl EXT(__xorll)
|
||||
.type EXT(__xorll),@function
|
||||
.text
|
||||
.p2align 4
|
||||
EXT(__xorll):
|
||||
P(xor) gr9, gr11, gr9
|
||||
P2(xor) gr8, gr10, gr8
|
||||
ret
|
||||
.Lend:
|
||||
.size EXT(__xorll),.Lend-EXT(__xorll)
|
||||
#endif
|
||||
|
||||
#ifdef L_notll
|
||||
/* gr8,gr9 = __notll (long long a) */
|
||||
/* Note, gcc will never call this function, but it is present in case an
|
||||
ABI program calls it. */
|
||||
|
||||
.file "_notll.s"
|
||||
.globl EXT(__notll)
|
||||
.type EXT(__notll),@function
|
||||
.text
|
||||
.p2align 4
|
||||
EXT(__notll):
|
||||
P(not) gr9, gr9
|
||||
P2(not) gr8, gr8
|
||||
ret
|
||||
.Lend:
|
||||
.size EXT(__notll),.Lend-EXT(__notll)
|
||||
#endif
|
||||
|
||||
#ifdef L_cmov
|
||||
/* (void) __cmov (char *dest, const char *src, size_t len) */
|
||||
/*
|
||||
* void __cmov (char *dest, const char *src, size_t len)
|
||||
* {
|
||||
* size_t i;
|
||||
*
|
||||
* if (dest < src || dest > src+len)
|
||||
* {
|
||||
* for (i = 0; i < len; i++)
|
||||
* dest[i] = src[i];
|
||||
* }
|
||||
* else
|
||||
* {
|
||||
* while (len-- > 0)
|
||||
* dest[len] = src[len];
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
|
||||
.file "_cmov.s"
|
||||
.globl EXT(__cmov)
|
||||
.type EXT(__cmov),@function
|
||||
.text
|
||||
.p2align 4
|
||||
EXT(__cmov):
|
||||
P(cmp) gr8, gr9, icc0
|
||||
add gr9, gr10, gr4
|
||||
P(cmp) gr8, gr4, icc1
|
||||
bc icc0, 0, .Lfwd
|
||||
bls icc1, 0, .Lback
|
||||
.Lfwd:
|
||||
/* move bytes in a forward direction */
|
||||
P(setlos) #0, gr5
|
||||
cmp gr0, gr10, icc0
|
||||
P(subi) gr9, #1, gr9
|
||||
P2(subi) gr8, #1, gr8
|
||||
bnc icc0, 0, .Lret
|
||||
.Lfloop:
|
||||
/* forward byte move loop */
|
||||
addi gr5, #1, gr5
|
||||
P(ldsb) @(gr9, gr5), gr4
|
||||
cmp gr5, gr10, icc0
|
||||
P(stb) gr4, @(gr8, gr5)
|
||||
bc icc0, 0, .Lfloop
|
||||
ret
|
||||
.Lbloop:
|
||||
/* backward byte move loop body */
|
||||
ldsb @(gr9,gr10),gr4
|
||||
stb gr4,@(gr8,gr10)
|
||||
.Lback:
|
||||
P(cmpi) gr10, #0, icc0
|
||||
addi gr10, #-1, gr10
|
||||
bne icc0, 0, .Lbloop
|
||||
.Lret:
|
||||
ret
|
||||
.Lend:
|
||||
.size EXT(__cmov),.Lend-EXT(__cmov)
|
||||
#endif
|
@ -1,4 +0,0 @@
|
||||
int __modi (int a, int b)
|
||||
{
|
||||
return a % b;
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
# Name of assembly file containing libgcc1 functions.
|
||||
# This entry must be present, but it can be empty if the target does
|
||||
# not need any assembler functions to support its code generation.
|
||||
#
|
||||
# Alternatively if assembler functions *are* needed then define the
|
||||
# entries below:
|
||||
CROSS_LIBGCC1 = libgcc1-asm.a
|
||||
LIB1ASMSRC = frv/lib1funcs.asm
|
||||
LIB1ASMFUNCS = _cmpll _cmpf _cmpd _addll _subll _andll _orll _xorll _notll _cmov
|
||||
LIB2FUNCS_EXTRA = cmovh.c cmovw.c cmovd.c modi.c umodi.c uitof.c uitod.c ulltof.c ulltod.c
|
||||
|
||||
# We want fine grained libraries, so use the new code to build the
|
||||
# floating point emulation libraries.
|
||||
FPBIT = fp-bit.c
|
||||
DPBIT = dp-bit.c
|
||||
|
||||
# If any special flags are necessary when building libgcc2 put them here.
|
||||
TARGET_LIBGCC2_CFLAGS =
|
||||
|
||||
fp-bit.c: $(srcdir)/config/fp-bit.c
|
||||
echo '#define FLOAT' > fp-bit.c
|
||||
echo '#include "config/frv/frv-abi.h"' >> fp-bit.c
|
||||
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
|
||||
|
||||
dp-bit.c: $(srcdir)/config/fp-bit.c
|
||||
echo '#include "config/frv/frv-abi.h"' > dp-bit.c
|
||||
cat $(srcdir)/config/fp-bit.c >> dp-bit.c
|
||||
|
||||
cmovh.c: $(srcdir)/config/frv/cmovh.c
|
||||
$(LN_S) $(srcdir)/config/frv/cmovh.c .
|
||||
|
||||
cmovw.c: $(srcdir)/config/frv/cmovw.c
|
||||
$(LN_S) $(srcdir)/config/frv/cmovw.c .
|
||||
|
||||
cmovd.c: $(srcdir)/config/frv/cmovd.c
|
||||
$(LN_S) $(srcdir)/config/frv/cmovd.c .
|
||||
|
||||
modi.c: $(srcdir)/config/frv/modi.c
|
||||
$(LN_S) $(srcdir)/config/frv/modi.c .
|
||||
|
||||
umodi.c: $(srcdir)/config/frv/umodi.c
|
||||
$(LN_S) $(srcdir)/config/frv/umodi.c .
|
||||
|
||||
uitof.c: $(srcdir)/config/frv/uitof.c
|
||||
$(LN_S) $(srcdir)/config/frv/uitof.c .
|
||||
|
||||
uitod.c: $(srcdir)/config/frv/uitod.c
|
||||
$(LN_S) $(srcdir)/config/frv/uitod.c .
|
||||
|
||||
ulltof.c: $(srcdir)/config/frv/ulltof.c
|
||||
$(LN_S) $(srcdir)/config/frv/ulltof.c .
|
||||
|
||||
ulltod.c: $(srcdir)/config/frv/ulltod.c
|
||||
$(LN_S) $(srcdir)/config/frv/ulltod.c .
|
||||
|
||||
# Build frvbegin.o and frvend.o
|
||||
EXTRA_MULTILIB_PARTS=frvbegin.o frvend.o
|
||||
|
||||
# Compile two additional files that are linked with every program
|
||||
# linked using GCC on systems using COFF or ELF, for the sake of C++
|
||||
# constructors.
|
||||
|
||||
FRVSTUFF_CFLAGS = $(TARGET_LIBGCC2_CFLAGS)
|
||||
|
||||
$(T)frvbegin$(objext): $(srcdir)/config/frv/frvbegin.c $(GCC_PASSES) \
|
||||
$(CONFIG_H) defaults.h unwind-dw2-fde.h gbl-ctors.h
|
||||
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \
|
||||
-c $(srcdir)/config/frv/frvbegin.c -o $(T)frvbegin$(objext)
|
||||
|
||||
$(T)frvend$(objext): $(srcdir)/config/frv/frvend.c $(GCC_PASSES) \
|
||||
$(CONFIG_H) defaults.h unwind-dw2-fde.h gbl-ctors.h
|
||||
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \
|
||||
-c $(srcdir)/config/frv/frvend.c -o $(T)frvend$(objext)
|
||||
|
||||
# Enable the following if multilibs are needed.
|
||||
# See gcc/genmultilib, gcc/gcc.texi and gcc/tm.texi for a
|
||||
# description of the options and their values.
|
||||
#
|
||||
#MULTILIB_OPTIONS = mcpu=fr500/mcpu=tomcat/mcpu=simple/mcpu=frv msoft-float mdword/mno-dword
|
||||
#MULTILIB_DIRNAMES = fr500 tomcat simple frv nof dw no-dw
|
||||
#MULTILIB_MATCHES = mcpu?simple=mcpu?fr300 mno-double=mcpu?fr500 mcpu?frv=mdouble
|
||||
#MULTILIB_EXCEPTIONS = *mcpu=simple/*msoft-float* *mcpu=frv/*msoft-float*
|
||||
#MULTILIB_EXTRA_OPTS = mlibrary-pic
|
||||
|
||||
MULTILIB_OPTIONS = mcpu=frv/mcpu=fr400/mcpu=simple mno-pack mlibrary-pic
|
||||
MULTILIB_DIRNAMES = frv fr400 simple unpacked pic
|
||||
MULTILIB_MATCHES = mcpu?simple=mcpu?fr300 mlibrary-pic=fpic mlibrary-pic=fPIC
|
||||
MULTILIB_EXCEPTIONS = mcpu=frv/mno-pack* mcpu=simple/mno-pack*
|
||||
|
||||
LIBGCC = stmp-multilib
|
||||
INSTALL_LIBGCC = install-multilib
|
||||
|
||||
EXTRA_HEADERS = $(srcdir)/config/frv/frv-asm.h
|
@ -1,4 +0,0 @@
|
||||
double __uitod (unsigned int a)
|
||||
{
|
||||
return a;
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
float __uitof (unsigned int a)
|
||||
{
|
||||
return a;
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
double __ulltod (unsigned long long a)
|
||||
{
|
||||
return a;
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
float __ulltof (unsigned long long a)
|
||||
{
|
||||
return a;
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
unsigned int __umodi (unsigned int a, unsigned int b)
|
||||
{
|
||||
return a % b;
|
||||
}
|
@ -1,230 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler for Intel 80386
|
||||
running FreeBSD.
|
||||
Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Poul-Henning Kamp <phk@login.dkuug.dk>
|
||||
Continued development by David O'Brien <obrien@NUXI.org>
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Don't assume anything about the header files. */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
/* This goes away when the math-emulator is fixed */
|
||||
#undef TARGET_SUBTARGET_DEFAULT
|
||||
#define TARGET_SUBTARGET_DEFAULT \
|
||||
(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
|
||||
|
||||
/* The macro defined in i386.h doesn't work with the old gas of
|
||||
FreeBSD 2.x. The definition in sco.h and sol2.h appears to work,
|
||||
but it turns out that, even though the assembler doesn't complain,
|
||||
we get incorrect results. Fortunately, the definition in
|
||||
defaults.h works. */
|
||||
#undef ASM_PREFERRED_EH_DATA_FORMAT
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
builtin_define_std ("unix"); \
|
||||
builtin_define ("__FreeBSD__"); \
|
||||
builtin_assert ("system=unix"); \
|
||||
builtin_assert ("system=bsd"); \
|
||||
builtin_assert ("system=FreeBSD"); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Like the default, except no -lg. */
|
||||
#define LIB_SPEC "%{!shared:%{!pg:-lc}%{pg:-lc_p}}"
|
||||
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE "int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE BITS_PER_WORD
|
||||
|
||||
/* Override the default comment-starter of "/". */
|
||||
|
||||
#undef ASM_COMMENT_START
|
||||
#define ASM_COMMENT_START "#"
|
||||
|
||||
#undef ASM_APP_ON
|
||||
#define ASM_APP_ON "#APP\n"
|
||||
|
||||
#undef ASM_APP_OFF
|
||||
#define ASM_APP_OFF "#NO_APP\n"
|
||||
|
||||
/* FreeBSD using a.out does not support DWARF2 unwinding mechanisms. */
|
||||
#define DWARF2_UNWIND_INFO 0
|
||||
|
||||
/* Don't default to pcc-struct-return, because in FreeBSD we prefer the
|
||||
superior nature of the older gcc way. */
|
||||
#define DEFAULT_PCC_STRUCT_RETURN 0
|
||||
|
||||
/* Ensure we the configuration knows our system correctly so we can link with
|
||||
libraries compiled with the native cc. */
|
||||
#undef NO_DOLLAR_IN_LABEL
|
||||
|
||||
/* i386 freebsd still uses old binutils that don't insert nops by default
|
||||
when the .align directive demands to insert extra space in the text
|
||||
segment. */
|
||||
#undef ASM_OUTPUT_ALIGN
|
||||
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
||||
if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
|
||||
|
||||
/* Profiling routines, partially copied from i386/osfrose.h. */
|
||||
|
||||
/* Tell final.c that we don't need a label passed to mcount. */
|
||||
#define NO_PROFILE_COUNTERS 1
|
||||
|
||||
#undef MCOUNT_NAME
|
||||
#define MCOUNT_NAME "mcount"
|
||||
#undef PROFILE_COUNT_REGISTER
|
||||
#define PROFILE_COUNT_REGISTER "eax"
|
||||
|
||||
/*
|
||||
* Some imports from svr4.h in support of shared libraries.
|
||||
* Currently, we need the DECLARE_OBJECT_SIZE stuff.
|
||||
*/
|
||||
|
||||
/* Define the strings used for the special svr4 .type and .size directives.
|
||||
These strings generally do not vary from one system running svr4 to
|
||||
another, but if a given system (e.g. m88k running svr) needs to use
|
||||
different pseudo-op names for these, they may be overridden in the
|
||||
file which includes this one. */
|
||||
|
||||
#define TYPE_ASM_OP "\t.type\t"
|
||||
#define SIZE_ASM_OP "\t.size\t"
|
||||
#define SET_ASM_OP "\t.set\t"
|
||||
|
||||
/* The following macro defines the format used to output the second
|
||||
operand of the .type assembler directive. Different svr4 assemblers
|
||||
expect various different forms for this operand. The one given here
|
||||
is just a default. You may need to override it in your machine-
|
||||
specific tm.h file (depending upon the particulars of your assembler). */
|
||||
|
||||
#define TYPE_OPERAND_FMT "@%s"
|
||||
|
||||
#define HANDLE_SYSV_PRAGMA 1
|
||||
|
||||
#define ASM_WEAKEN_LABEL(FILE,NAME) \
|
||||
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
|
||||
fputc ('\n', FILE); } while (0)
|
||||
|
||||
/* Write the extra assembler code needed to declare a function's result.
|
||||
Most svr4 assemblers don't require any special declaration of the
|
||||
result value, but there are exceptions. */
|
||||
|
||||
#ifndef ASM_DECLARE_RESULT
|
||||
#define ASM_DECLARE_RESULT(FILE, RESULT)
|
||||
#endif
|
||||
|
||||
/* These macros generate the special .type and .size directives which
|
||||
are used to set the corresponding fields of the linker symbol table
|
||||
entries in an ELF object file under SVR4. These macros also output
|
||||
the starting labels for the relevant functions/objects. */
|
||||
|
||||
/* Write the extra assembler code needed to declare a function properly.
|
||||
Some svr4 assemblers need to also have something extra said about the
|
||||
function's return value. We allow for that here. */
|
||||
|
||||
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
|
||||
do \
|
||||
{ \
|
||||
ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
|
||||
ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
|
||||
ASM_OUTPUT_LABEL (FILE, NAME); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Write the extra assembler code needed to declare an object properly. */
|
||||
|
||||
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
|
||||
do \
|
||||
{ \
|
||||
HOST_WIDE_INT size; \
|
||||
\
|
||||
ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
|
||||
\
|
||||
size_directive_output = 0; \
|
||||
if (!flag_inhibit_size_directive \
|
||||
&& (DECL) && DECL_SIZE (DECL)) \
|
||||
{ \
|
||||
size_directive_output = 1; \
|
||||
size = int_size_in_bytes (TREE_TYPE (DECL)); \
|
||||
ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \
|
||||
} \
|
||||
\
|
||||
ASM_OUTPUT_LABEL (FILE, NAME); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Output the size directive for a decl in rest_of_decl_compilation
|
||||
in the case where we did not do so before the initializer.
|
||||
Once we find the error_mark_node, we know that the value of
|
||||
size_directive_output was set
|
||||
by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
|
||||
|
||||
#undef ASM_FINISH_DECLARE_OBJECT
|
||||
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
|
||||
do { \
|
||||
const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
|
||||
HOST_WIDE_INT size; \
|
||||
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
|
||||
&& ! AT_END && TOP_LEVEL \
|
||||
&& DECL_INITIAL (DECL) == error_mark_node \
|
||||
&& !size_directive_output) \
|
||||
{ \
|
||||
size_directive_output = 1; \
|
||||
size = int_size_in_bytes (TREE_TYPE (DECL)); \
|
||||
ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* This is how to declare the size of a function. */
|
||||
|
||||
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
|
||||
do { \
|
||||
if (!flag_inhibit_size_directive) \
|
||||
ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \
|
||||
} while (0)
|
||||
|
||||
#define AS_NEEDS_DASH_FOR_PIPED_INPUT
|
||||
#define ASM_SPEC "%{fpic|fpie|fPIC|fPIE:-k}"
|
||||
#define LINK_SPEC \
|
||||
"%{p:%e`-p' not supported; use `-pg' and gprof(1)} \
|
||||
%{shared:-Bshareable} \
|
||||
%{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \
|
||||
%{pg:-Bstatic} %{Z}} \
|
||||
%{assert*} %{R*}"
|
||||
|
||||
#define STARTFILE_SPEC \
|
||||
"%{shared:c++rt0.o%s} \
|
||||
%{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}"
|
||||
|
||||
/* Define this so we can compile MS code for use with WINE. */
|
||||
#define HANDLE_PRAGMA_PACK_PUSH_POP
|
||||
|
||||
/* FreeBSD 2.2.7's assembler does not support .quad properly. Do not
|
||||
use it. */
|
||||
#undef ASM_QUAD
|
@ -1,35 +0,0 @@
|
||||
/* Definitions for Intel 386 running GNU/KFreeBSD systems with ELF format.
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Contributed by Bruno Haible.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (i386 KFreeBSD/ELF)");
|
||||
|
||||
/* FIXME: Is a KFreeBSD-specific fallback mechanism necessary? */
|
||||
#undef MD_FALLBACK_FRAME_STATE_FOR
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-m elf_i386_fbsd %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
%{static:-static}}}"
|
@ -1,73 +0,0 @@
|
||||
/* Definitions for Intel 386 running Linux-based GNU systems using a.out.
|
||||
Copyright (C) 1992, 1994, 1995, 1997, 1998, 2002
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by H.J. Lu (hjl@nynexst.com)
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef ASM_COMMENT_START
|
||||
#define ASM_COMMENT_START "#"
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
LINUX_TARGET_OS_CPP_BUILTINS(); \
|
||||
if (flag_pic) \
|
||||
{ \
|
||||
builtin_define ("__PIC__"); \
|
||||
builtin_define ("__pic__"); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
|
||||
|
||||
#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
|
||||
|
||||
/* Don't default to pcc-struct-return, because gcc is the only compiler,
|
||||
and we want to retain compatibility with older gcc versions. */
|
||||
#define DEFAULT_PCC_STRUCT_RETURN 0
|
||||
|
||||
#undef LIB_SPEC
|
||||
|
||||
#if 1
|
||||
/* We no longer link with libc_p.a or libg.a by default. If you
|
||||
want to profile or debug the GNU/Linux C library, please add
|
||||
-lc_p or -ggdb to LDFLAGS at the link time, respectively. */
|
||||
#define LIB_SPEC \
|
||||
"%{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}"
|
||||
#else
|
||||
#define LIB_SPEC \
|
||||
"%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
|
||||
%{!p:%{!pg:%{!g*:-lc} %{g*:-lg -static}}}"
|
||||
#endif
|
||||
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-m i386linux"
|
@ -1,70 +0,0 @@
|
||||
/* Definitions for Intel 386 running LynxOS, using Lynx's old as and ld.
|
||||
Copyright (C) 1993, 1995, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (80386, LYNX BSD syntax)");
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
builtin_define_std ("unix"); \
|
||||
builtin_define_std ("I386"); \
|
||||
builtin_define_std ("Lynx"); \
|
||||
builtin_define_std ("IBITS32"); \
|
||||
builtin_assert ("system=unix"); \
|
||||
builtin_assert ("system=lynx"); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Provide required defaults for linker switches. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-P1000 %{msystem-v:-V} %{mcoff:-k}"
|
||||
|
||||
/* Apparently LynxOS clobbers ebx when you call into the OS. */
|
||||
|
||||
#undef CALL_USED_REGISTERS
|
||||
#define CALL_USED_REGISTERS \
|
||||
/*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \
|
||||
{ 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
|
||||
|
||||
/* Prefix for internally generated assembler labels. If we aren't using
|
||||
underscores, we are using prefix `.'s to identify labels that should
|
||||
be ignored, as in `i386/gas.h' --karl@cs.umb.edu */
|
||||
|
||||
#undef LPREFIX
|
||||
#define LPREFIX ".L"
|
||||
|
||||
/* The prefix to add to user-visible assembler symbols. */
|
||||
|
||||
#undef USER_LABEL_PREFIX
|
||||
#define USER_LABEL_PREFIX ""
|
||||
|
||||
/* If user-symbols don't have underscores,
|
||||
then it must take more than `L' to identify
|
||||
a label that should be ignored. */
|
||||
|
||||
/* This is how to store into the string BUF
|
||||
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(BUF,PREFIX,NUMBER) \
|
||||
sprintf ((BUF), ".%s%ld", (PREFIX), (long)(NUMBER))
|
@ -1,43 +0,0 @@
|
||||
/* Definitions for Intel 386 running MOSS
|
||||
Copyright (C) 1996, 2001 Free Software Foundation, Inc.
|
||||
Contributed by Bryan Ford <baford@cs.utah.edu>
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef TARGET_OS_CPP_BUILTINS /* config.gcc includes i386/linux.h. */
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
builtin_define_std ("moss"); \
|
||||
builtin_assert ("system=posix"); \
|
||||
if (flag_pic) \
|
||||
{ \
|
||||
builtin_define ("__PIC__"); \
|
||||
builtin_define ("__pic__"); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "crt0.o%s"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "crtn.o%s"
|
||||
|
||||
#undef LINK_SPEC
|
||||
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* svr3.ifile - for collectless G++ on i386 System V.
|
||||
* Leaves memory configured at address 0.
|
||||
*
|
||||
* Install this file as $prefix/gcc-lib/TARGET/VERSION/gcc.ifile
|
||||
*
|
||||
* BLOCK to an offset that leaves room for many headers ( the value
|
||||
* here allows for a file header, an outheader, and up to 11 section
|
||||
* headers on most systems.
|
||||
* BIND to an address that includes page 0 in mapped memory. The value
|
||||
* used for BLOCK should be or'd into this value. Here I'm setting BLOCK
|
||||
* to 0x200 and BIND to ( value_used_for(BLOCK) )
|
||||
* If you are using shared libraries, watch that you don't overlap the
|
||||
* address ranges assigned for shared libs.
|
||||
*
|
||||
* GROUP BIND to a location in the next segment. Here, the only value
|
||||
* that you should change (I think) is that within NEXT, which I've set
|
||||
* to my hardware segment size. You can always use a larger size, but not
|
||||
* a smaller one.
|
||||
*/
|
||||
SECTIONS
|
||||
{
|
||||
.text BIND(0x000200) BLOCK (0x200) :
|
||||
{
|
||||
/* plenty for room for headers */
|
||||
*(.init)
|
||||
*(.text)
|
||||
vfork = fork; /* I got tired of editing peoples sloppy code */
|
||||
*(.fini)
|
||||
}
|
||||
.stab BIND(ADDR(.text) + SIZEOF(.text)): { }
|
||||
.stabstr BIND(ADDR(.stab) + SIZEOF(.stab)): { }
|
||||
GROUP BIND( NEXT(0x400000) +
|
||||
(ADDR(.stabstr) + (SIZEOF(.stabstr)) % 0x1000)):
|
||||
{
|
||||
.data : {
|
||||
__CTOR_LIST__ = . ;
|
||||
. += 4 ; /* leading NULL */
|
||||
*(.ctor)
|
||||
. += 4 ; /* trailing NULL */
|
||||
__DTOR_LIST__ = . ;
|
||||
. += 4 ; /* leading NULL */
|
||||
*(.dtor)
|
||||
. += 4 ; /* trailing NULL */
|
||||
}
|
||||
.bss : { }
|
||||
}
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
/* Definitions for Intel 386 running system V, using dbx-in-coff encapsulation.
|
||||
Copyright (C) 1992, 1995, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* We do not want to output SDB debugging information. */
|
||||
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
|
||||
/* We want to output DBX debugging information. */
|
||||
|
||||
#define DBX_DEBUGGING_INFO 1
|
||||
|
||||
/* Compensate for botch in dbxout_init/dbxout_source_file which
|
||||
unconditionally drops the first character from ltext_label_name */
|
||||
|
||||
#undef ASM_GENERATE_INTERNAL_LABEL
|
||||
#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
|
||||
sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER))
|
||||
|
||||
/* With the current gas, .align N aligns to an N-byte boundary.
|
||||
This is done to be compatible with the system assembler.
|
||||
You must specify -DOTHER_ALIGN when building gas-1.38.1. */
|
||||
|
||||
#undef ASM_OUTPUT_ALIGN
|
||||
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
||||
if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
|
||||
|
||||
/* Align labels, etc. at 4-byte boundaries.
|
||||
For the 486, align to 16-byte boundary for sake of cache. */
|
||||
|
||||
#undef LABEL_ALIGN_AFTER_BARRIER
|
||||
#define LABEL_ALIGN_AFTER_BARRIER(LABEL) (i386_align_jumps)
|
||||
|
||||
/* Align start of loop at 4-byte boundary. */
|
||||
|
||||
#undef LOOP_ALIGN
|
||||
#define LOOP_ALIGN(LABEL) (i386_align_loops)
|
||||
|
||||
|
||||
/* Additional overrides needed for dbx-in-coff gas, mostly taken from pbb.h */
|
||||
|
||||
/* Although the gas we use can create .ctor and .dtor sections from N_SETT
|
||||
stabs, it does not support section directives, so we need to have the loader
|
||||
define the lists.
|
||||
*/
|
||||
#define CTOR_LISTS_DEFINED_EXTERNALLY
|
||||
|
||||
/* Use crt1.o as a startup file and crtn.o as a closing file. */
|
||||
/*
|
||||
* The loader directive file svr3.ifile defines how to merge the constructor
|
||||
* sections into the data section. Also, since gas only puts out those
|
||||
* sections in response to N_SETT stabs, and does not (yet) have a
|
||||
* ".sections" directive, svr3.ifile also defines the list symbols
|
||||
* __DTOR_LIST__ and __CTOR_LIST__.
|
||||
*/
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!r:%{!z:svr3.ifile%s}%{z:svr3z.ifile%s}}\
|
||||
%{pg:gcrt1.o%s}%{!pg:%{posix:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}%{!posix:%{p:mcrt1.o%s}%{!p:crt1.o%s}}} \
|
||||
%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}"
|
||||
|
||||
#define ENDFILE_SPEC "crtn.o%s"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc -lg"
|
@ -1,141 +0,0 @@
|
||||
/* Definitions for Intel 386 running system V, using gas.
|
||||
Copyright (C) 1992, 1996, 2000, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (80386, ATT syntax)");
|
||||
|
||||
/* Add stuff that normally comes from i386/sysv3.h */
|
||||
|
||||
/* longjmp may fail to restore the registers if called from the same
|
||||
function that called setjmp. To compensate, the compiler avoids
|
||||
putting variables in registers in functions that use both setjmp
|
||||
and longjmp. */
|
||||
|
||||
#define NON_SAVING_SETJMP \
|
||||
(current_function_calls_setjmp && current_function_calls_longjmp)
|
||||
|
||||
/* longjmp may fail to restore the stack pointer if the saved frame
|
||||
pointer is the same as the caller's frame pointer. Requiring a frame
|
||||
pointer in any function that calls setjmp or longjmp avoids this
|
||||
problem, unless setjmp and longjmp are called from the same function.
|
||||
Since a frame pointer will be required in such a function, it is OK
|
||||
that the stack pointer is not restored. */
|
||||
|
||||
#undef SUBTARGET_FRAME_POINTER_REQUIRED
|
||||
#define SUBTARGET_FRAME_POINTER_REQUIRED \
|
||||
(current_function_calls_setjmp || current_function_calls_longjmp)
|
||||
|
||||
/* Modify ASM_OUTPUT_LOCAL slightly to test -msvr3-shlib, adapted to gas */
|
||||
#undef ASM_OUTPUT_LOCAL
|
||||
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
|
||||
do { \
|
||||
int align = exact_log2 (ROUNDED); \
|
||||
if (align > 2) align = 2; \
|
||||
if (TARGET_SVR3_SHLIB) \
|
||||
{ \
|
||||
data_section (); \
|
||||
ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \
|
||||
ASM_OUTPUT_LABEL ((FILE), (NAME)); \
|
||||
fprintf ((FILE), "\t.set .,.+%u\n", (int)(ROUNDED)); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
fputs (".lcomm ", (FILE)); \
|
||||
assemble_name ((FILE), (NAME)); \
|
||||
fprintf ((FILE), ",%u\n", (int)(ROUNDED)); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Add stuff that normally comes from i386/sysv3.h via svr3.h */
|
||||
|
||||
/* Define the actual types of some ANSI-mandated types. These
|
||||
definitions should work for most SVR3 systems. */
|
||||
|
||||
#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
|
||||
|
||||
/* ??? This stuff is copied from config/svr3.h. In the future,
|
||||
this file should be rewritten to include config/svr3.h
|
||||
and override what isn't right. */
|
||||
|
||||
#define INIT_SECTION_ASM_OP "\t.section\t.init"
|
||||
#define FINI_SECTION_ASM_OP "\t.section .fini,\"x\""
|
||||
#define CTORS_SECTION_ASM_OP INIT_SECTION_ASM_OP
|
||||
#define DTORS_SECTION_ASM_OP FINI_SECTION_ASM_OP
|
||||
|
||||
/* CTOR_LIST_BEGIN and CTOR_LIST_END are machine-dependent
|
||||
because they push on the stack. */
|
||||
/* This is copied from i386/sysv3.h. */
|
||||
|
||||
#define CTOR_LIST_BEGIN \
|
||||
asm (INIT_SECTION_ASM_OP); \
|
||||
asm ("pushl $0")
|
||||
#define CTOR_LIST_END CTOR_LIST_BEGIN
|
||||
|
||||
/* Constructor list on stack is in reverse order. Go to the end of the
|
||||
list and go backwards to call constructors in the right order. */
|
||||
#define DO_GLOBAL_CTORS_BODY \
|
||||
do { \
|
||||
func_ptr *p, *beg = alloca (0); \
|
||||
for (p = beg; *p; p++) \
|
||||
; \
|
||||
while (p != beg) \
|
||||
(*--p) (); \
|
||||
} while (0)
|
||||
|
||||
#undef EXTRA_SECTIONS
|
||||
#define EXTRA_SECTIONS in_init, in_fini
|
||||
|
||||
#undef EXTRA_SECTION_FUNCTIONS
|
||||
#define EXTRA_SECTION_FUNCTIONS \
|
||||
INIT_SECTION_FUNCTION \
|
||||
FINI_SECTION_FUNCTION
|
||||
|
||||
#define INIT_SECTION_FUNCTION \
|
||||
void \
|
||||
init_section () \
|
||||
{ \
|
||||
if (in_section != in_init) \
|
||||
{ \
|
||||
fprintf (asm_out_file, "%s\n", INIT_SECTION_ASM_OP); \
|
||||
in_section = in_init; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define FINI_SECTION_FUNCTION \
|
||||
void \
|
||||
fini_section () \
|
||||
{ \
|
||||
if (in_section != in_fini) \
|
||||
{ \
|
||||
fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP); \
|
||||
in_section = in_fini; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define TARGET_ASM_CONSTRUCTOR ix86_svr3_asm_out_constructor
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* svr3z.ifile - for collectless G++ on i386 System V.
|
||||
* Leaves memory unconfigured at address 0.
|
||||
*
|
||||
* Install this file as $prefix/gcc-lib/TARGET/VERSION/gccz.ifile
|
||||
*
|
||||
* BLOCK to an offset that leaves room for many headers ( the value
|
||||
* here allows for a file header, an outheader, and up to 11 section
|
||||
* headers on most systems.
|
||||
* BIND to an address that excludes page 0 from being mapped. The value
|
||||
* used for BLOCK should be or'd into this value. Here I'm setting BLOCK
|
||||
* to 0x200 and BIND to ( 0x400000 | value_used_for(BLOCK) )
|
||||
* If you are using shared libraries, watch that you don't overlap the
|
||||
* address ranges assigned for shared libs.
|
||||
*
|
||||
* GROUP BIND to a location in the next segment. Here, the only value
|
||||
* that you should change (I think) is that within NEXT, which I've set
|
||||
* to my hardware segment size. You can always use a larger size, but not
|
||||
* a smaller one.
|
||||
*/
|
||||
SECTIONS
|
||||
{
|
||||
.text BIND(0x400200) BLOCK (0x200) :
|
||||
{
|
||||
/* plenty for room for headers */
|
||||
*(.init)
|
||||
*(.text)
|
||||
vfork = fork; /* I got tired of editing peoples sloppy code */
|
||||
*(.fini)
|
||||
}
|
||||
.stab BIND(ADDR(.text) + SIZEOF(.text)): { }
|
||||
.stabstr BIND(ADDR(.stab) + SIZEOF(.stab)): { }
|
||||
GROUP BIND( NEXT(0x400000) +
|
||||
(ADDR(.stabstr) + (SIZEOF(.stabstr)) % 0x1000)):
|
||||
{
|
||||
.data : {
|
||||
__CTOR_LIST__ = . ;
|
||||
. += 4 ; /* leading NULL */
|
||||
*(.ctor)
|
||||
. += 4 ; /* trailing NULL */
|
||||
__DTOR_LIST__ = . ;
|
||||
. += 4 ; /* leading NULL */
|
||||
*(.dtor)
|
||||
. += 4 ; /* trailing NULL */
|
||||
}
|
||||
.bss : { }
|
||||
}
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
/* Definitions for Intel 386 running system V.
|
||||
Copyright (C) 1988, 1996, 2000, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (80386, ATT syntax)");
|
||||
|
||||
/* Use crt1.o as a startup file and crtn.o as a closing file. */
|
||||
|
||||
#define STARTFILE_SPEC \
|
||||
"%{pg:gcrt1.o%s}%{!pg:%{posix:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}%{!posix:%{p:mcrt1.o%s}%{!p:crt1.o%s}}} crtbegin.o%s\
|
||||
%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}"
|
||||
|
||||
/* ??? There is a suggestion that -lg is needed here.
|
||||
Does anyone know whether this is right? */
|
||||
#define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc crtend.o%s crtn.o%s"
|
||||
|
||||
/* Specify predefined symbols in preprocessor. */
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
builtin_define_std ("unix"); \
|
||||
builtin_assert ("system=svr3"); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
|
||||
|
||||
/* Writing `int' for a bit-field forces int alignment for the structure. */
|
||||
|
||||
#define PCC_BITFIELD_TYPE_MATTERS 1
|
||||
|
||||
/* We want to be able to get DBX debugging information via -gstabs. */
|
||||
|
||||
#define DBX_DEBUGGING_INFO 1
|
||||
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
|
||||
|
||||
/* longjmp may fail to restore the registers if called from the same
|
||||
function that called setjmp. To compensate, the compiler avoids
|
||||
putting variables in registers in functions that use both setjmp
|
||||
and longjmp. */
|
||||
|
||||
#define NON_SAVING_SETJMP \
|
||||
(current_function_calls_setjmp && current_function_calls_longjmp)
|
||||
|
||||
/* longjmp may fail to restore the stack pointer if the saved frame
|
||||
pointer is the same as the caller's frame pointer. Requiring a frame
|
||||
pointer in any function that calls setjmp or longjmp avoids this
|
||||
problem, unless setjmp and longjmp are called from the same function.
|
||||
Since a frame pointer will be required in such a function, it is OK
|
||||
that the stack pointer is not restored. */
|
||||
|
||||
#undef SUBTARGET_FRAME_POINTER_REQUIRED
|
||||
#define SUBTARGET_FRAME_POINTER_REQUIRED \
|
||||
(current_function_calls_setjmp || current_function_calls_longjmp)
|
||||
|
||||
/* Modify ASM_OUTPUT_LOCAL slightly to test -msvr3-shlib. */
|
||||
#undef ASM_OUTPUT_LOCAL
|
||||
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
|
||||
do { \
|
||||
int align = exact_log2 (ROUNDED); \
|
||||
if (align > 2) align = 2; \
|
||||
if (TARGET_SVR3_SHLIB) \
|
||||
data_section (); \
|
||||
else \
|
||||
bss_section (); \
|
||||
ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \
|
||||
ASM_OUTPUT_LABEL ((FILE), (NAME)); \
|
||||
fprintf ((FILE), "\t.set .,.+%u\n", (int)(ROUNDED));\
|
||||
} while (0)
|
||||
|
||||
/* Define a few machine-specific details of the implementation of
|
||||
constructors.
|
||||
|
||||
The __CTORS_LIST__ goes in the .init section. Define CTOR_LIST_BEGIN
|
||||
and CTOR_LIST_END to contribute to the .init section an instruction to
|
||||
push a word containing 0 (or some equivalent of that). */
|
||||
|
||||
#undef INIT_SECTION_ASM_OP
|
||||
#define INIT_SECTION_ASM_OP "\t.section .init,\"x\""
|
||||
|
||||
#define CTOR_LIST_BEGIN \
|
||||
asm (INIT_SECTION_ASM_OP); \
|
||||
asm ("pushl $0")
|
||||
#define CTOR_LIST_END CTOR_LIST_BEGIN
|
||||
|
||||
#define TARGET_ASM_CONSTRUCTOR ix86_svr3_asm_out_constructor
|
@ -1,2 +0,0 @@
|
||||
# Tell fixincludes to work on this set of headers
|
||||
SYSTEM_HEADER_DIR = /udk/usr/include
|
@ -1,28 +0,0 @@
|
||||
/* Configuration for i386 interfacing with SCO's Universal Development Kit
|
||||
probably running on OpenServer 5, Unixware 2, or Unixware 5
|
||||
*/
|
||||
|
||||
|
||||
/* We're very much the SVR4 target with "/udk" prepended to everything that's
|
||||
interesting */
|
||||
|
||||
#undef MD_EXEC_PREFIX
|
||||
#define MD_EXEC_PREFIX "/udk/usr/ccs/bin/"
|
||||
|
||||
#undef MD_STARTFILE_PREFIX
|
||||
#define MD_STARTFILE_PREFIX "/udk/usr/ccs/lib/"
|
||||
|
||||
#define STANDARD_INCLUDE_DIR "/udk/usr/include"
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{h*} %{v:-V} \
|
||||
%{b} %{Wl,*:%*} \
|
||||
%{static:-dn -Bstatic} \
|
||||
%{shared:-G -dy -z text} \
|
||||
%{symbolic:-Bsymbolic -G -dy -z text} \
|
||||
%{G:-G} \
|
||||
%{YP,*} \
|
||||
%{!YP,*:%{p:-Y P,/udk/usr/ccs/lib/libp:/udk/usr/lib/libp:/udk/usr/ccs/lib:/udk/usr/lib} \
|
||||
%{!p:-Y P,/udk/usr/ccs/lib:/udk/usr/lib}} \
|
||||
%{Qy:} %{!Qn:-Qy}"
|
||||
|
@ -1,32 +0,0 @@
|
||||
/* Configuration for an i386 running VSTa micro-kernel.
|
||||
Copyright (C) 1994, 2002 Free Software Foundation, Inc.
|
||||
Contributed by Rob Savoye (rob@cygnus.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (80386, BSD syntax)");
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
builtin_define_std ("unix"); \
|
||||
builtin_define ("VSTA"); \
|
||||
builtin_assert ("system=unix"); \
|
||||
builtin_assert ("system=vsta"); \
|
||||
} \
|
||||
while (0)
|
@ -1,41 +0,0 @@
|
||||
/* Definitions for GNU/KFreeBSD systems with ELF format.
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Contributed by Bruno Haible.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef TARGET_OS_CPP_BUILTINS
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
builtin_define ("__GNU_KFreeBSD__=0"); \
|
||||
builtin_define ("__gnu_kfreebsd__=0"); \
|
||||
builtin_define ("__FreeBSD_kernel__=5"); \
|
||||
builtin_define ("__ELF__"); \
|
||||
builtin_define_std ("unix"); \
|
||||
builtin_assert ("system=posix");
|
||||
|
||||
#undef TARGET_CPU_CPP_BUILTINS
|
||||
#define TARGET_CPU_CPP_BUILTINS() \
|
||||
builtin_define ("__i386__"); \
|
||||
builtin_define_std ("i386"); \
|
||||
builtin_assert ("cpu=i386"); \
|
||||
builtin_assert ("machine=i386");
|
||||
|
||||
/* do {} while (0) */
|
@ -1,37 +0,0 @@
|
||||
/* Definitions for Linux-based GNU systems with a.out binaries.
|
||||
Copyright (C) 1995, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
Contributed by H.J. Lu (hjl@nynexst.com)
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Don't assume anything about the header files. */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}"
|
||||
|
||||
#undef ASM_APP_ON
|
||||
#define ASM_APP_ON "#APP\n"
|
||||
|
||||
#undef ASM_APP_OFF
|
||||
#define ASM_APP_OFF "#NO_APP\n"
|
||||
|
||||
#define SET_ASM_OP "\t.set\t"
|
||||
|
||||
/* We need that too. */
|
||||
#define HANDLE_SYSV_PRAGMA 1
|
@ -1,114 +0,0 @@
|
||||
/* Target independent definitions for LynxOS, using Lynx's old as and ld.
|
||||
Copyright (C) 1993, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This is for backwards compatibility with older Lynx tools, which use
|
||||
a version of a.out format. */
|
||||
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC "%{mcoff:-C}"
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%{mthreads:-D_MULTITHREADED} \
|
||||
%{mposix:-D_POSIX_SOURCE} \
|
||||
%{msystem-v:-I/usr/include_v}"
|
||||
|
||||
/* Provide required defaults for linker switches. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{msystem-v:-V} %{mcoff:-k}"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "%{mthreads:-L/lib/thread/}%{msystem-v:-lc_v}%{!msystem-v:%{mposix:-lc_p} -lc}"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "%{p:%{mcoff:pinit1.o%s}%{!mcoff:pinit.o%s}}%{!p:%{msystem-v:%{mcoff:vinit1.o%s}%{!mcoff:vinit.o%s}}%{!msystem-v:%{mcoff:init1.o%s}%{!mcoff:init.o%s}}}"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "%{mcoff:initn.o%s} %{p:_etext.o%s}"
|
||||
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "unsigned int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE "long int"
|
||||
|
||||
/* We want to output DBX debugging information. */
|
||||
|
||||
#define DBX_DEBUGGING_INFO 1
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||
|
||||
/* We optionally want to be able to produce SDB debugging output so that
|
||||
we can create debuggable SDB/coff files. This won't be needed when
|
||||
stabs-in-coff works. */
|
||||
|
||||
#define SDB_DEBUGGING_INFO 1
|
||||
|
||||
/* Generate calls to memcpy, memcmp and memset. */
|
||||
|
||||
#define TARGET_MEM_FUNCTIONS
|
||||
|
||||
/* Handle #pragma pack and sometimes #pragma weak. */
|
||||
|
||||
#define HANDLE_SYSV_PRAGMA 1
|
||||
|
||||
#define TARGET_THREADS (target_flags & MASK_THREADS)
|
||||
#define MASK_THREADS 0x40000000
|
||||
|
||||
#define TARGET_POSIX (target_flags & MASK_POSIX)
|
||||
#define MASK_POSIX 0x20000000
|
||||
|
||||
#define TARGET_SYSTEM_V (target_flags & MASK_SYSTEM_V)
|
||||
#define MASK_SYSTEM_V 0x10000000
|
||||
|
||||
#define TARGET_COFF (target_flags & MASK_COFF)
|
||||
#define MASK_COFF 0x08000000
|
||||
|
||||
#undef SUBTARGET_SWITCHES
|
||||
#define SUBTARGET_SWITCHES \
|
||||
{"threads", MASK_THREADS}, \
|
||||
{"posix", MASK_POSIX}, \
|
||||
{"system-v", MASK_SYSTEM_V}, \
|
||||
{"coff", MASK_COFF},
|
||||
|
||||
#undef SUBTARGET_OVERRIDE_OPTIONS
|
||||
#define SUBTARGET_OVERRIDE_OPTIONS \
|
||||
{ if (TARGET_SYSTEM_V && profile_flag) \
|
||||
warning ("-msystem-v and -p are incompatible"); \
|
||||
if (TARGET_SYSTEM_V && TARGET_THREADS) \
|
||||
warning ("-msystem-v and -mthreads are incompatible"); }
|
||||
|
||||
/* This is defined only so that we can find the assembler. Everything else
|
||||
is in /bin. */
|
||||
|
||||
#define MD_EXEC_PREFIX "/usr/local/lib/gcc-"
|
||||
|
||||
/* This is needed because /bin/ld does not handle -L options correctly. */
|
||||
|
||||
#define LINK_LIBGCC_SPECIAL_1
|
||||
|
||||
/* The Lynx linker considers __main to be a possible entry point, so we
|
||||
must use a different name. */
|
||||
|
||||
#define NAME__MAIN "____main"
|
||||
#define SYMBOL__MAIN ____main
|
@ -1,27 +0,0 @@
|
||||
/* Target definitions for GNU compiler for PowerPC with AltiVec.
|
||||
Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Aldy Hernandez (aldyh@redhat.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA. */
|
||||
|
||||
#undef SUBSUBTARGET_OVERRIDE_OPTIONS
|
||||
#define SUBSUBTARGET_OVERRIDE_OPTIONS \
|
||||
do { \
|
||||
rs6000_altivec_abi = 1; \
|
||||
target_flags |= MASK_ALTIVEC; \
|
||||
} while (0)
|
@ -1,2 +0,0 @@
|
||||
#define IN_LIBGCC2_S 1
|
||||
#include "darwin-ldouble.c"
|
@ -1,45 +0,0 @@
|
||||
/* Definitions for Rs6000 running LynxOS.
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
Contributed by David Henkel-Wallace, Cygnus Support (gumby@cygnus.com)
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA. */
|
||||
|
||||
/* Definitions we want to override with those from rs6000.h: */
|
||||
#undef LIB_SPEC
|
||||
#undef PTRDIFF_TYPE
|
||||
#undef SIZE_TYPE
|
||||
#undef WCHAR_TYPE
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#undef EXTRA_SECTIONS
|
||||
#undef READONLY_DATA_SECTION
|
||||
#undef READONLY_DATA_SECTION_ASM_OP
|
||||
#undef EXTRA_SECTION_FUNCTIONS
|
||||
#undef TARGET_ASM_SELECT_RTX_SECTION
|
||||
#undef TARGET_ASM_SELECT_SECTION
|
||||
#undef USER_LABEL_PREFIX
|
||||
#undef ASM_OUTPUT_LABELREF
|
||||
#undef ASM_GENERATE_INTERNAL_LABEL
|
||||
#undef ASM_OUTPUT_COMMON
|
||||
#undef ASM_OUTPUT_LOCAL
|
||||
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
#undef DBX_DEBUGGING_INFO
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
|
||||
#undef FUNCTION_PROFILER
|
||||
#undef SUBTARGET_SWITCHES
|
@ -1,64 +0,0 @@
|
||||
/* Definitions of target machine for GCC, for SPARC using a.out.
|
||||
Copyright (C) 1994, 1996, 2002 Free Software Foundation, Inc.
|
||||
Contributed by Michael Tiemann (tiemann@cygnus.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Print subsidiary information on the compiler version in use. */
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (sparc)");
|
||||
|
||||
/* These compiler options take an argument. We ignore -target for now. */
|
||||
|
||||
#define WORD_SWITCH_TAKES_ARG(STR) \
|
||||
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
|
||||
|| !strcmp (STR, "target") || !strcmp (STR, "assert"))
|
||||
|
||||
#define TARGET_ASM_SELECT_SECTION sparc_aout_select_section
|
||||
#define TARGET_ASM_SELECT_RTX_SECTION sparc_aout_select_rtx_section
|
||||
|
||||
/* Output the label for a function definition. */
|
||||
|
||||
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
|
||||
do { \
|
||||
ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
|
||||
ASM_OUTPUT_LABEL (FILE, NAME); \
|
||||
} while (0)
|
||||
|
||||
/* Output before read-only data. */
|
||||
|
||||
#define TEXT_SECTION_ASM_OP "\t.text"
|
||||
|
||||
/* Output before writable data. */
|
||||
|
||||
#define DATA_SECTION_ASM_OP "\t.data"
|
||||
|
||||
/* How to renumber registers for dbx and gdb. In the flat model, the frame
|
||||
pointer is really %i7. */
|
||||
|
||||
#define DBX_REGISTER_NUMBER(REGNO) \
|
||||
(TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : REGNO)
|
||||
|
||||
/* This is how to output a note to DBX telling it the line number
|
||||
to which the following sequence of instructions corresponds.
|
||||
|
||||
This is needed for SunOS 4.0, and should not hurt for 3.2
|
||||
versions either. */
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
|
||||
fprintf (file, ".stabn 68,0,%d,LM%d\nLM%d:\n", \
|
||||
line, counter, counter)
|
@ -1,50 +0,0 @@
|
||||
/* Definitions of target machine for GCC,
|
||||
for SPARC running in an embedded environment using the ELF file format.
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC \
|
||||
"%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
|
||||
crtend.o%s crtn.o%s"
|
||||
|
||||
/* 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
|
||||
|
||||
/* This solaris2 define does not apply. */
|
||||
#undef STDC_0_IN_SYSTEM_HEADERS
|
||||
|
||||
/* We don't want to use the Solaris2 specific long long int conversion
|
||||
routines or 64-bit integer multiply and divide routines. */
|
||||
#undef SUN_CONVERSION_LIBFUNCS
|
||||
#define SUN_CONVERSION_LIBFUNCS 0
|
||||
|
||||
#undef SUN_INTEGER_MULTIPLY_64
|
||||
#define SUN_INTEGER_MULTIPLY_64 0
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user