This commit was generated by cvs2svn to compensate for changes in r124151,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
parent
eb46541e9c
commit
8412b382ed
@ -1,35 +0,0 @@
|
||||
/* Define constants for communication with c-parse.y.
|
||||
Copyright (C) 1987, 1992, 1998, 1999, 2000 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. */
|
||||
|
||||
#ifndef GCC_C_LEX_H
|
||||
#define GCC_C_LEX_H
|
||||
|
||||
extern tree make_pointer_declarator PARAMS ((tree, tree));
|
||||
extern void position_after_white_space PARAMS ((void));
|
||||
|
||||
extern int c_lex PARAMS ((tree *));
|
||||
extern const char *init_c_lex PARAMS ((const char *));
|
||||
|
||||
extern int indent_level;
|
||||
|
||||
struct cpp_reader;
|
||||
extern struct cpp_reader* parse_in;
|
||||
|
||||
#endif /* ! GCC_C_LEX_H */
|
@ -1,37 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler
|
||||
for Alpha Linux-based GNU systems using ECOFF.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Bob Manson.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (Alpha GNU/Linux for ECOFF)");
|
||||
|
||||
#undef CPP_SUBTARGET_SPEC
|
||||
#define CPP_SUBTARGET_SPEC "-D__ECOFF__"
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-G 8 %{O*:-O3} %{!O*:-O1}"
|
||||
|
||||
/* stabs get slurped by the assembler into a queer ecoff format. */
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||
|
||||
/* We support #pragma. */
|
||||
#define HANDLE_SYSV_PRAGMA
|
@ -1,33 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler, for DEC Alpha.
|
||||
Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
Contributed by Richard Kenner (kenner@nyu.edu)
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* In OSF 1.2, there is a linker bug that prevents use of -O3 to
|
||||
the linker. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"-G 8 -O1 %{static:-non_shared} %{rpath*} \
|
||||
%{!static:%{shared:-shared} %{!shared:-call_shared}} %{taso}"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "short unsigned int"
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 16
|
@ -1,32 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler, for DEC Alpha, osf[23].
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* In OSF 2 or 3, linking with -lprof1 doesn't require -lpdf. */
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} %{a:-lprof2} -lc"
|
||||
|
||||
/* As of OSF 3.2, as still can't subtract adjacent labels. */
|
||||
#undef TARGET_AS_CAN_SUBTRACT_LABELS
|
||||
#define TARGET_AS_CAN_SUBTRACT_LABELS 0
|
||||
|
||||
/* The frame unwind data requires the ability to subtract labels. */
|
||||
#undef DWARF2_UNWIND_INFO
|
||||
#define DWARF2_UNWIND_INFO 0
|
@ -1,66 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler,
|
||||
for ARM with PE obj format running under the WinCE operating system.
|
||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define ARM_WINCE 1
|
||||
|
||||
#include "pe.h"
|
||||
|
||||
#undef USER_LABEL_PREFIX
|
||||
#define USER_LABEL_PREFIX ""
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fputs (" (ARM/WinCE/PE)", stderr);
|
||||
|
||||
/* The next three definitions are defined in pe.h,
|
||||
undefined in arm/arm-pe.h and then redefined back here! */
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "-lcoredll -lcorelibc"
|
||||
|
||||
#define MATH_LIBRARY ""
|
||||
|
||||
#define LIBSTDCXX "-lc"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC ""
|
||||
#define ENDFILE_SPEC ""
|
||||
|
||||
#undef CPP_APCS_PC_DEFAULT_SPEC
|
||||
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||
|
||||
#undef CC1_SPEC
|
||||
#define CC1_SPEC "%{!mapcs-32:%{!mapcs-26:-mapcs-32}}"
|
||||
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC " \
|
||||
%{mbig-endian:-EB} \
|
||||
%{mcpu=*:-m%*} \
|
||||
%{march=*:-m%*} \
|
||||
%{mapcs-*:-mapcs-%*} \
|
||||
%{mthumb-interwork:-mthumb-interwork} \
|
||||
%{!mapcs-32:%{!mapcs-26:-mapcs-32}} \
|
||||
"
|
||||
|
||||
/* WinCE headers require -DARM */
|
||||
#undef PE_SUBTARGET_CPP_SPEC
|
||||
#define PE_SUBTARGET_CPP_SPEC "-D__pe__ -DARM -D__unaligned=__attribute__((aligned(1))) "
|
||||
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "long unsigned int"
|
@ -1,144 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler. ARM RISCiX version.
|
||||
Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
|
||||
work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
|
||||
and Martin Simmons (@harleqn.co.uk).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Translation to find startup files. On RISC iX boxes,
|
||||
crt0, mcrt0 and gcrt0.o are in /usr/lib. */
|
||||
#define STARTFILE_SPEC "\
|
||||
%{pg:/usr/lib/gcrt0.o%s}\
|
||||
%{!pg:%{p:/usr/lib/mcrt0.o%s}\
|
||||
%{!p:/usr/lib/crt0.o%s}}"
|
||||
|
||||
/* RISC iX has no concept of -lg */
|
||||
/* If -static is specified then link with -lc_n */
|
||||
|
||||
#ifndef LIB_SPEC
|
||||
#define LIB_SPEC "\
|
||||
%{g*:-lg}\
|
||||
%{!p:%{!pg:%{!static:-lc}%{static:-lc_n}}}\
|
||||
%{p:-lc_p}\
|
||||
%{pg:-lc_p}"
|
||||
#endif
|
||||
|
||||
/* The RISC iX assembler never deletes any symbols from the object module;
|
||||
and, by default, ld doesn't either. -X causes local symbols starting
|
||||
with 'L' to be deleted, which is what we want. */
|
||||
#ifndef LINK_SPEC
|
||||
#define LINK_SPEC "-X"
|
||||
#endif
|
||||
|
||||
#ifndef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES \
|
||||
"-Darm -Driscix -Dunix -Asystem=unix"
|
||||
#endif
|
||||
|
||||
|
||||
/* RISCiX has some weird symbol name munging, that is done to the object module
|
||||
after assembly, which enables multiple libraries to be supported within
|
||||
one (possibly shared) library. It basically changes the symbol name of
|
||||
certain symbols (for example _bcopy is converted to _$bcopy if using BSD)
|
||||
Symrename's parameters are determined as follows:
|
||||
-mno-symrename Don't run symrename
|
||||
-mbsd symrename -BSD <file>
|
||||
-mxopen symrename -XOPEN <file>
|
||||
-ansi symrename - <file>
|
||||
<none> symrename -BSD <file>
|
||||
*/
|
||||
|
||||
#ifndef ASM_FINAL_SPEC
|
||||
#if !defined (CROSS_COMPILE)
|
||||
#define ASM_FINAL_SPEC "\
|
||||
%{!mno-symrename: \
|
||||
\n /usr/bin/symrename \
|
||||
-%{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible}BSD}\
|
||||
%{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible}\
|
||||
%{pedantic:%e-mxopen and -pedantic incompatible}XOPEN}\
|
||||
%{!mbsd:%{!mxopen:%{!ansi:BSD}}} %{c:%{o*:%*}%{!o*:%b.o}}%{!c:%U.o}}"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* None of these is actually used in cc1. If we don't define them in target
|
||||
switches cc1 complains about them. For the sake of argument lets allocate
|
||||
bit 31 of target flags for such options. */
|
||||
#define SUBTARGET_SWITCHES \
|
||||
{"bsd", 0x80000000, N_("Do symbol renaming for BSD")}, \
|
||||
{"xopen", 0x80000000, N_("Do symbol renaming for X/OPEN")}, \
|
||||
{"no-symrename", 0x80000000, N_("Don't do symbol renaming")},
|
||||
|
||||
|
||||
/* Run-time Target Specification. */
|
||||
#define TARGET_VERSION \
|
||||
fputs (" (ARM/RISCiX)", stderr);
|
||||
|
||||
/* This is used in ASM_FILE_START */
|
||||
#define ARM_OS_NAME "RISCiX"
|
||||
|
||||
/* Unsigned chars produces much better code than signed. */
|
||||
#define DEFAULT_SIGNED_CHAR 0
|
||||
|
||||
/* Some systems use __main in a way incompatible with its use in gcc, in these
|
||||
cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
|
||||
give the same symbol without quotes for an alternative entry point. You
|
||||
must define both, or neither. */
|
||||
#ifndef NAME__MAIN
|
||||
#define NAME__MAIN "__gccmain"
|
||||
#define SYMBOL__MAIN __gccmain
|
||||
#endif
|
||||
|
||||
/* size_t is "unsigned int" in RISCiX */
|
||||
#define SIZE_TYPE "unsigned int"
|
||||
|
||||
/* ptrdiff_t is "int" in RISCiX */
|
||||
#define PTRDIFF_TYPE "int"
|
||||
|
||||
/* Maths operation domain error number, EDOM */
|
||||
#define TARGET_EDOM 33
|
||||
|
||||
/* Override the normal default CPU */
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm2
|
||||
|
||||
/* r10 is reserved by RISCiX */
|
||||
#define SUBTARGET_CONDITIONAL_REGISTER_USAGE \
|
||||
fixed_regs[10] = 1; \
|
||||
call_used_regs[10] = 1;
|
||||
|
||||
#include "arm/aout.h"
|
||||
|
||||
/* The RISCiX assembler does not understand .set */
|
||||
#undef SET_ASM_OP
|
||||
|
||||
/* Add to CPP_SPEC, we want to add the right #defines when using the include
|
||||
files. */
|
||||
#define SUBTARGET_CPP_SPEC "\
|
||||
%{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible} -D_BSD_C} \
|
||||
%{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible} \
|
||||
%{pedantic:%e-mxopen and -pedantic incompatible} -D_XOPEN_C} \
|
||||
%{!mbsd:%{!mxopen:%{!ansi: -D_BSD_C}}}"
|
||||
|
||||
/* The native RISCiX assembler does not support stabs of any kind; because
|
||||
the native assembler is not used by the compiler, Acorn didn't feel it was
|
||||
necessary to put them in! */
|
||||
|
||||
#ifdef DBX_DEBUGGING_INFO
|
||||
#undef DBX_DEBUGGING_INFO
|
||||
#endif
|
@ -1,103 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler. ARM RISCiX 1.1x version.
|
||||
Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
|
||||
Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
|
||||
work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
|
||||
and Martin Simmons (@harleqn.co.uk).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* RISCiX 1.1x is basically the same as 1.2x except that it doesn't have
|
||||
symrename or atexit. */
|
||||
|
||||
/* Translation to find startup files. On RISCiX boxes, gcrt0.o is in
|
||||
/usr/lib. */
|
||||
#define STARTFILE_SPEC \
|
||||
"%{pg:/usr/lib/gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
|
||||
|
||||
#ifndef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Darm -Driscix -Dunix -Asystem=unix"
|
||||
#endif
|
||||
|
||||
/* Riscix 1.1 doesn't have X/OPEN support, so only accept -mbsd (but ignore
|
||||
it).
|
||||
By not having -mxopen and -mno-symrename, we get warning messages,
|
||||
but everything still compiles. */
|
||||
/* None of these is actually used in cc1, so they modify bit 31 */
|
||||
#define SUBTARGET_SWITCHES \
|
||||
{"bsd", 0x80000000, ""},
|
||||
|
||||
|
||||
/* Run-time Target Specification. */
|
||||
#define TARGET_VERSION \
|
||||
fputs (" (ARM/RISCiX)", stderr);
|
||||
|
||||
/* This is used in ASM_FILE_START */
|
||||
#define ARM_OS_NAME "RISCiX"
|
||||
|
||||
#ifdef riscos
|
||||
#define TARGET_WHEN_DEBUGGING 3
|
||||
#else
|
||||
#define TARGET_WHEN_DEBUGGING 1
|
||||
#endif
|
||||
|
||||
/* 'char' is signed by default on RISCiX, unsigned on RISCOS. */
|
||||
#ifdef riscos
|
||||
#define DEFAULT_SIGNED_CHAR 0
|
||||
#else
|
||||
#define DEFAULT_SIGNED_CHAR 1
|
||||
#endif
|
||||
|
||||
/* Define this if the target system lacks the function atexit from the
|
||||
ANSI C standard. If this is defined, and ON_EXIT is not
|
||||
defined, a default exit function will be provided to support C++.
|
||||
The man page only describes on_exit, but atexit is also there.
|
||||
This seems to be missing in early versions.
|
||||
|
||||
FIXME Should we define ON_EXIT here? */
|
||||
#define NEED_ATEXIT
|
||||
|
||||
/* Some systems use __main in a way incompatible with its use in gcc, in these
|
||||
cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
|
||||
give the same symbol without quotes for an alternative entry point. You
|
||||
must define both, or neither. */
|
||||
#ifndef NAME__MAIN
|
||||
#define NAME__MAIN "__gccmain"
|
||||
#define SYMBOL__MAIN __gccmain
|
||||
#endif
|
||||
|
||||
/* Override the normal default CPU */
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm2
|
||||
|
||||
/* r10 is reserved by RISCiX */
|
||||
#define SUBTARGET_CONDITIONAL_REGISTER_USAGE \
|
||||
fixed_regs[10] = 1; \
|
||||
call_used_regs[10] = 1;
|
||||
|
||||
|
||||
#include "arm/aout.h"
|
||||
|
||||
#define SUBTARGET_CPP_SPEC "%{!ansi: -D_BSD_C}"
|
||||
|
||||
|
||||
/* The native RISCiX assembler does not support stabs of any kind; because
|
||||
the native assembler is not used by the compiler, Acorn didn't feel it was
|
||||
necessary to put them in! */
|
||||
|
||||
#ifdef DBX_DEBUGGING_INFO
|
||||
#undef DBX_DEBUGGING_INFO
|
||||
#endif
|
@ -1,42 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler. ARM RISCiX(stabs) version.
|
||||
Copyright (C) 1993 Free Software Foundation, Inc.
|
||||
Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
|
||||
work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
|
||||
and Martin Simmons (@harleqn.co.uk).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Limit the length of a stabs entry (for the broken Acorn assembler) */
|
||||
#undef DBX_CONTIN_LENGTH
|
||||
#define DBX_CONTIN_LENGTH 80
|
||||
|
||||
/* The native RISCiX assembler does not support stabs of any kind; because
|
||||
the native assembler is not used by the compiler, Acorn didn't feel it was
|
||||
necessary to put them in!
|
||||
However, this file assumes that we have an assembler that does have stabs,
|
||||
so we put them back in. */
|
||||
|
||||
#define DBX_DEBUGGING_INFO
|
||||
|
||||
/* Unfortunately dbx doesn't understand these */
|
||||
/* Dbx on RISCiX is so broken that I've given up trying to support it.
|
||||
lets just support gdb. */
|
||||
/* #define DEFAULT_GDB_EXTENSIONS 0 */
|
||||
/* RISCiX dbx doesn't accept xrefs */
|
||||
/* #define DBX_NO_XREFS 1 */
|
||||
|
@ -1,6 +0,0 @@
|
||||
# Just for these, we omit the frame pointer since it makes such a big
|
||||
# difference. It is then pointless adding debugging.
|
||||
TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer
|
||||
LIBGCC2_DEBUG_CFLAGS = -g0
|
||||
|
||||
FIXPROTO_DEFINES= -D_POSIX_SOURCE -D_XOPEN_C -D_BSD_C -D_XOPEN_SOURCE
|
@ -1,96 +0,0 @@
|
||||
/* float.h for target with TMS320C3x/C4x floating point format */
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
/* Produced by enquire version 4.3, CWI, Amsterdam */
|
||||
|
||||
/* Radix of exponent representation */
|
||||
#undef FLT_RADIX
|
||||
#define FLT_RADIX 2
|
||||
/* Number of base-FLT_RADIX digits in the significand of a float */
|
||||
#undef FLT_MANT_DIG
|
||||
#define FLT_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a float */
|
||||
#undef FLT_DIG
|
||||
#define FLT_DIG 6
|
||||
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
|
||||
#undef FLT_ROUNDS
|
||||
#define FLT_ROUNDS 1
|
||||
/* Difference between 1.0 and the minimum float greater than 1.0 */
|
||||
#undef FLT_EPSILON
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
|
||||
#undef FLT_MIN_EXP
|
||||
#define FLT_MIN_EXP (-126)
|
||||
/* Minimum normalised float */
|
||||
#undef FLT_MIN
|
||||
#define FLT_MIN 5.8774718E-39F
|
||||
/* Minimum int x such that 10**x is a normalised float */
|
||||
#undef FLT_MIN_10_EXP
|
||||
#define FLT_MIN_10_EXP (-39)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
|
||||
#undef FLT_MAX_EXP
|
||||
#define FLT_MAX_EXP 128
|
||||
/* Maximum float */
|
||||
#undef FLT_MAX
|
||||
#define FLT_MAX 3.4028235e+38F
|
||||
/* Maximum int x such that 10**x is a representable float */
|
||||
#undef FLT_MAX_10_EXP
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 6
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 1.1920929e-07
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-126)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 5.8774718E-39
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP -39
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 128
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 3.4028235E+38
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 38
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a long double */
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG 32
|
||||
/* Number of decimal digits of precision in a long double */
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG 8
|
||||
/* Difference between 1.0 and the minimum long double greater than 1.0 */
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON 1.19209287e-07L
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP (-126)
|
||||
/* Minimum normalised long double */
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN 5.8774717535e-39L
|
||||
/* Minimum int x such that 10**x is a normalised long double */
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP (-39)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP 128
|
||||
/* Maximum long double */
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX .4028236688e+38L
|
||||
/* Maximum int x such that 10**x is a representable long double */
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP 38
|
||||
|
||||
#endif /* _FLOAT_H_ */
|
@ -1,123 +0,0 @@
|
||||
/* float.h for target with IEEE 32, 64 and 128 bit floating point formats */
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
/* Produced by enquire version 4.3, CWI, Amsterdam */
|
||||
|
||||
/* Radix of exponent representation */
|
||||
#undef FLT_RADIX
|
||||
#define FLT_RADIX 2
|
||||
/* Number of base-FLT_RADIX digits in the significand of a float */
|
||||
#undef FLT_MANT_DIG
|
||||
#define FLT_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a float */
|
||||
#undef FLT_DIG
|
||||
#define FLT_DIG 6
|
||||
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
|
||||
#undef FLT_ROUNDS
|
||||
#define FLT_ROUNDS 1
|
||||
/* Difference between 1.0 and the minimum float greater than 1.0 */
|
||||
#undef FLT_EPSILON
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
|
||||
#undef FLT_MIN_EXP
|
||||
#define FLT_MIN_EXP (-125)
|
||||
/* Minimum normalised float */
|
||||
#undef FLT_MIN
|
||||
#define FLT_MIN 1.17549435e-38F
|
||||
/* Minimum int x such that 10**x is a normalised float */
|
||||
#undef FLT_MIN_10_EXP
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
|
||||
#undef FLT_MAX_EXP
|
||||
#define FLT_MAX_EXP 128
|
||||
/* Maximum float */
|
||||
#undef FLT_MAX
|
||||
#define FLT_MAX 3.40282347e+38F
|
||||
/* Maximum int x such that 10**x is a representable float */
|
||||
#undef FLT_MAX_10_EXP
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 53
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 15
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 2.2204460492503131e-16
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-1021)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 2.2250738585072014e-308
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP (-307)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 1024
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 1.7976931348623157e+308
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 308
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a long double */
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG 113
|
||||
/* Number of decimal digits of precision in a long double */
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG 33
|
||||
/* Difference between 1.0 and the minimum long double greater than 1.0 */
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP (-16381)
|
||||
/* Minimum normalised long double */
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
|
||||
/* Minimum int x such that 10**x is a normalised long double */
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP (-4931)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP 16384
|
||||
/* Maximum long double */
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
|
||||
/* Maximum int x such that 10**x is a representable long double */
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP 4932
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/* The floating-point expression evaluation method.
|
||||
-1 indeterminate
|
||||
0 evaluate all operations and constants just to the range and
|
||||
precision of the type
|
||||
1 evaluate operations and constants of type float and double
|
||||
to the range and precision of the double type, evaluate
|
||||
long double operations and constants to the range and
|
||||
precision of the long double type
|
||||
2 evaluate all operations and constants to the range and
|
||||
precision of the long double type
|
||||
*/
|
||||
# undef FLT_EVAL_METHOD
|
||||
# define FLT_EVAL_METHOD 0
|
||||
|
||||
/* Number of decimal digits to enable rounding to the given number of
|
||||
decimal digits without loss of precision.
|
||||
if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX)
|
||||
else : ceil (1 + #mantissa * log10 (FLT_RADIX))
|
||||
where #mantissa is the number of bits in the mantissa of the widest
|
||||
supported floating-point type.
|
||||
*/
|
||||
# undef DECIMAL_DIG
|
||||
# define DECIMAL_DIG 36
|
||||
|
||||
#endif /* C99 */
|
||||
|
||||
#endif /* _FLOAT_H_ */
|
@ -1,123 +0,0 @@
|
||||
/* float.h for target with only IEEE 32 bit floating point format */
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
/* Produced by enquire version 4.3, CWI, Amsterdam */
|
||||
|
||||
/* Radix of exponent representation */
|
||||
#undef FLT_RADIX
|
||||
#define FLT_RADIX 2
|
||||
/* Number of base-FLT_RADIX digits in the significand of a float */
|
||||
#undef FLT_MANT_DIG
|
||||
#define FLT_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a float */
|
||||
#undef FLT_DIG
|
||||
#define FLT_DIG 6
|
||||
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
|
||||
#undef FLT_ROUNDS
|
||||
#define FLT_ROUNDS 1
|
||||
/* Difference between 1.0 and the minimum float greater than 1.0 */
|
||||
#undef FLT_EPSILON
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
|
||||
#undef FLT_MIN_EXP
|
||||
#define FLT_MIN_EXP (-125)
|
||||
/* Minimum normalised float */
|
||||
#undef FLT_MIN
|
||||
#define FLT_MIN 1.17549435e-38F
|
||||
/* Minimum int x such that 10**x is a normalised float */
|
||||
#undef FLT_MIN_10_EXP
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
|
||||
#undef FLT_MAX_EXP
|
||||
#define FLT_MAX_EXP 128
|
||||
/* Maximum float */
|
||||
#undef FLT_MAX
|
||||
#define FLT_MAX 3.40282347e+38F
|
||||
/* Maximum int x such that 10**x is a representable float */
|
||||
#undef FLT_MAX_10_EXP
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 6
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-125)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 1.17549435e-38F
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP (-37)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 128
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 3.40282347e+38F
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 38
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a long double */
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a long double */
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG 6
|
||||
/* Difference between 1.0 and the minimum long double greater than 1.0 */
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP (-125)
|
||||
/* Minimum normalised long double */
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN 1.17549435e-38F
|
||||
/* Minimum int x such that 10**x is a normalised long double */
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP (-37)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP 128
|
||||
/* Maximum long double */
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX 3.40282347e+38F
|
||||
/* Maximum int x such that 10**x is a representable long double */
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP 38
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/* The floating-point expression evaluation method.
|
||||
-1 indeterminate
|
||||
0 evaluate all operations and constants just to the range and
|
||||
precision of the type
|
||||
1 evaluate operations and constants of type float and double
|
||||
to the range and precision of the double type, evaluate
|
||||
long double operations and constants to the range and
|
||||
precision of the long double type
|
||||
2 evaluate all operations and constants to the range and
|
||||
precision of the long double type
|
||||
*/
|
||||
# undef FLT_EVAL_METHOD
|
||||
# define FLT_EVAL_METHOD 0
|
||||
|
||||
/* Number of decimal digits to enable rounding to the given number of
|
||||
decimal digits without loss of precision.
|
||||
if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX)
|
||||
else : ceil (1 + #mantissa * log10 (FLT_RADIX))
|
||||
where #mantissa is the number of bits in the mantissa of the widest
|
||||
supported floating-point type.
|
||||
*/
|
||||
# undef DECIMAL_DIG
|
||||
# define DECIMAL_DIG 9
|
||||
|
||||
#endif /* C99 */
|
||||
|
||||
#endif /* _FLOAT_H_ */
|
@ -1,124 +0,0 @@
|
||||
/* float.h for target with IEEE 32/64 bit and Intel 386 style 80 bit
|
||||
floating point formats */
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
/* Produced by enquire version 4.3, CWI, Amsterdam */
|
||||
|
||||
/* Radix of exponent representation */
|
||||
#undef FLT_RADIX
|
||||
#define FLT_RADIX 2
|
||||
/* Number of base-FLT_RADIX digits in the significand of a float */
|
||||
#undef FLT_MANT_DIG
|
||||
#define FLT_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a float */
|
||||
#undef FLT_DIG
|
||||
#define FLT_DIG 6
|
||||
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
|
||||
#undef FLT_ROUNDS
|
||||
#define FLT_ROUNDS 1
|
||||
/* Difference between 1.0 and the minimum float greater than 1.0 */
|
||||
#undef FLT_EPSILON
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
|
||||
#undef FLT_MIN_EXP
|
||||
#define FLT_MIN_EXP (-125)
|
||||
/* Minimum normalised float */
|
||||
#undef FLT_MIN
|
||||
#define FLT_MIN 1.17549435e-38F
|
||||
/* Minimum int x such that 10**x is a normalised float */
|
||||
#undef FLT_MIN_10_EXP
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
|
||||
#undef FLT_MAX_EXP
|
||||
#define FLT_MAX_EXP 128
|
||||
/* Maximum float */
|
||||
#undef FLT_MAX
|
||||
#define FLT_MAX 3.40282347e+38F
|
||||
/* Maximum int x such that 10**x is a representable float */
|
||||
#undef FLT_MAX_10_EXP
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 53
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 15
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 2.2204460492503131e-16
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-1021)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 2.2250738585072014e-308
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP (-307)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 1024
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 1.7976931348623157e+308
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 308
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a long double */
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG 64
|
||||
/* Number of decimal digits of precision in a long double */
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG 18
|
||||
/* Difference between 1.0 and the minimum long double greater than 1.0 */
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON 1.08420217248550443401e-19L
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP (-16381)
|
||||
/* Minimum normalised long double */
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN 3.36210314311209350626e-4932L
|
||||
/* Minimum int x such that 10**x is a normalised long double */
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP (-4931)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP 16384
|
||||
/* Maximum long double */
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX 1.18973149535723176502e+4932L
|
||||
/* Maximum int x such that 10**x is a representable long double */
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP 4932
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/* The floating-point expression evaluation method.
|
||||
-1 indeterminate
|
||||
0 evaluate all operations and constants just to the range and
|
||||
precision of the type
|
||||
1 evaluate operations and constants of type float and double
|
||||
to the range and precision of the double type, evaluate
|
||||
long double operations and constants to the range and
|
||||
precision of the long double type
|
||||
2 evaluate all operations and constants to the range and
|
||||
precision of the long double type
|
||||
*/
|
||||
# undef FLT_EVAL_METHOD
|
||||
# define FLT_EVAL_METHOD 2
|
||||
|
||||
/* Number of decimal digits to enable rounding to the given number of
|
||||
decimal digits without loss of precision.
|
||||
if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX)
|
||||
else : ceil (1 + #mantissa * log10 (FLT_RADIX))
|
||||
where #mantissa is the number of bits in the mantissa of the widest
|
||||
supported floating-point type.
|
||||
*/
|
||||
# undef DECIMAL_DIG
|
||||
# define DECIMAL_DIG 21
|
||||
|
||||
#endif /* C99 */
|
||||
|
||||
#endif /* _FLOAT_H___ */
|
@ -1,123 +0,0 @@
|
||||
/* float.h for target with IEEE 32 bit and 64 bit floating point formats */
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
/* Produced by enquire version 4.3, CWI, Amsterdam */
|
||||
|
||||
/* Radix of exponent representation */
|
||||
#undef FLT_RADIX
|
||||
#define FLT_RADIX 2
|
||||
/* Number of base-FLT_RADIX digits in the significand of a float */
|
||||
#undef FLT_MANT_DIG
|
||||
#define FLT_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a float */
|
||||
#undef FLT_DIG
|
||||
#define FLT_DIG 6
|
||||
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
|
||||
#undef FLT_ROUNDS
|
||||
#define FLT_ROUNDS 1
|
||||
/* Difference between 1.0 and the minimum float greater than 1.0 */
|
||||
#undef FLT_EPSILON
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
|
||||
#undef FLT_MIN_EXP
|
||||
#define FLT_MIN_EXP (-125)
|
||||
/* Minimum normalised float */
|
||||
#undef FLT_MIN
|
||||
#define FLT_MIN 1.17549435e-38F
|
||||
/* Minimum int x such that 10**x is a normalised float */
|
||||
#undef FLT_MIN_10_EXP
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
|
||||
#undef FLT_MAX_EXP
|
||||
#define FLT_MAX_EXP 128
|
||||
/* Maximum float */
|
||||
#undef FLT_MAX
|
||||
#define FLT_MAX 3.40282347e+38F
|
||||
/* Maximum int x such that 10**x is a representable float */
|
||||
#undef FLT_MAX_10_EXP
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 53
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 15
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 2.2204460492503131e-16
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-1021)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 2.2250738585072014e-308
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP (-307)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 1024
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 1.7976931348623157e+308
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 308
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a long double */
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG 53
|
||||
/* Number of decimal digits of precision in a long double */
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG 15
|
||||
/* Difference between 1.0 and the minimum long double greater than 1.0 */
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON 2.2204460492503131e-16L
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP (-1021)
|
||||
/* Minimum normalised long double */
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN 2.2250738585072014e-308L
|
||||
/* Minimum int x such that 10**x is a normalised long double */
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP (-307)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP 1024
|
||||
/* Maximum long double */
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX 1.7976931348623157e+308L
|
||||
/* Maximum int x such that 10**x is a representable long double */
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP 308
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/* The floating-point expression evaluation method.
|
||||
-1 indeterminate
|
||||
0 evaluate all operations and constants just to the range and
|
||||
precision of the type
|
||||
1 evaluate operations and constants of type float and double
|
||||
to the range and precision of the double type, evaluate
|
||||
long double operations and constants to the range and
|
||||
precision of the long double type
|
||||
2 evaluate all operations and constants to the range and
|
||||
precision of the long double type
|
||||
*/
|
||||
# undef FLT_EVAL_METHOD
|
||||
# define FLT_EVAL_METHOD 0
|
||||
|
||||
/* Number of decimal digits to enable rounding to the given number of
|
||||
decimal digits without loss of precision.
|
||||
if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX)
|
||||
else : ceil (1 + #mantissa * log10 (FLT_RADIX))
|
||||
where #mantissa is the number of bits in the mantissa of the widest
|
||||
supported floating-point type.
|
||||
*/
|
||||
# undef DECIMAL_DIG
|
||||
# define DECIMAL_DIG 17
|
||||
|
||||
#endif /* C99 */
|
||||
|
||||
#endif /* _FLOAT_H_ */
|
@ -1,127 +0,0 @@
|
||||
/* float.h for target with IEEE 32 bit and 64 bit and Motorola style 96 bit
|
||||
floating point formats */
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
/* Produced by enquire version 4.3, CWI, Amsterdam */
|
||||
|
||||
/* Radix of exponent representation */
|
||||
#undef FLT_RADIX
|
||||
#define FLT_RADIX 2
|
||||
/* Number of base-FLT_RADIX digits in the significand of a float */
|
||||
#undef FLT_MANT_DIG
|
||||
#define FLT_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a float */
|
||||
#undef FLT_DIG
|
||||
#define FLT_DIG 6
|
||||
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
|
||||
#undef FLT_ROUNDS
|
||||
#define FLT_ROUNDS 1
|
||||
/* Difference between 1.0 and the minimum float greater than 1.0 */
|
||||
#undef FLT_EPSILON
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
|
||||
#undef FLT_MIN_EXP
|
||||
#define FLT_MIN_EXP (-125)
|
||||
/* Minimum normalised float */
|
||||
#undef FLT_MIN
|
||||
#define FLT_MIN 1.17549435e-38F
|
||||
/* Minimum int x such that 10**x is a normalised float */
|
||||
#undef FLT_MIN_10_EXP
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
|
||||
#undef FLT_MAX_EXP
|
||||
#define FLT_MAX_EXP 128
|
||||
/* Maximum float */
|
||||
#undef FLT_MAX
|
||||
#define FLT_MAX 3.40282347e+38F
|
||||
/* Maximum int x such that 10**x is a representable float */
|
||||
#undef FLT_MAX_10_EXP
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 53
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 15
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 2.2204460492503131e-16
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-1021)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 2.2250738585072014e-308
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP (-307)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 1024
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 1.7976931348623157e+308
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 308
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a long double */
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG 64
|
||||
/* Number of decimal digits of precision in a long double */
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG 18
|
||||
/* Difference between 1.0 and the minimum long double greater than 1.0 */
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON 1.08420217248550443401e-19L
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP (-16382)
|
||||
/* Minimum normalised long double */
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN 1.68105157155604675313e-4932L
|
||||
/* Minimum int x such that 10**x is a normalised long double */
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP (-4931)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP 16384
|
||||
/* Maximum long double */
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX 1.18973149535723176502e+4932L
|
||||
/* Maximum int x such that 10**x is a representable long double */
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP 4932
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/* The floating-point expression evaluation method.
|
||||
-1 indeterminate
|
||||
0 evaluate all operations and constants just to the range and
|
||||
precision of the type
|
||||
1 evaluate operations and constants of type float and double
|
||||
to the range and precision of the double type, evaluate
|
||||
long double operations and constants to the range and
|
||||
precision of the long double type
|
||||
2 evaluate all operations and constants to the range and
|
||||
precision of the long double type
|
||||
*/
|
||||
|
||||
/* ??? FLT_EVAL_METHOD depends on TARGET_68040_ONLY. We do not currently
|
||||
have a preprocessor token that we can use to tell that this is on. */
|
||||
# undef FLT_EVAL_METHOD
|
||||
# define FLT_EVAL_METHOD -1
|
||||
|
||||
/* Number of decimal digits to enable rounding to the given number of
|
||||
decimal digits without loss of precision.
|
||||
if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX)
|
||||
else : ceil (1 + #mantissa * log10 (FLT_RADIX))
|
||||
where #mantissa is the number of bits in the mantissa of the widest
|
||||
supported floating-point type.
|
||||
*/
|
||||
# undef DECIMAL_DIG
|
||||
# define DECIMAL_DIG 21
|
||||
|
||||
#endif /* C99 */
|
||||
|
||||
#endif /* _FLOAT_H_ */
|
@ -1,160 +0,0 @@
|
||||
/* float.h for target sh3e with optional IEEE 32 bit double format */
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
/* Produced by enquire version 4.3, CWI, Amsterdam */
|
||||
|
||||
/* Radix of exponent representation */
|
||||
#undef FLT_RADIX
|
||||
#define FLT_RADIX 2
|
||||
/* Number of base-FLT_RADIX digits in the significand of a float */
|
||||
#undef FLT_MANT_DIG
|
||||
#define FLT_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a float */
|
||||
#undef FLT_DIG
|
||||
#define FLT_DIG 6
|
||||
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
|
||||
#undef FLT_ROUNDS
|
||||
#define FLT_ROUNDS 1
|
||||
/* Difference between 1.0 and the minimum float greater than 1.0 */
|
||||
#undef FLT_EPSILON
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
|
||||
#undef FLT_MIN_EXP
|
||||
#define FLT_MIN_EXP (-125)
|
||||
/* Minimum normalised float */
|
||||
#undef FLT_MIN
|
||||
#define FLT_MIN 1.17549435e-38F
|
||||
/* Minimum int x such that 10**x is a normalised float */
|
||||
#undef FLT_MIN_10_EXP
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
|
||||
#undef FLT_MAX_EXP
|
||||
#define FLT_MAX_EXP 128
|
||||
/* Maximum float */
|
||||
#undef FLT_MAX
|
||||
#define FLT_MAX 3.40282347e+38F
|
||||
/* Maximum int x such that 10**x is a representable float */
|
||||
#undef FLT_MAX_10_EXP
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
#if defined (__SH3E__) || defined (__SH4_SINGLE_ONLY__)
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 6
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-125)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 1.17549435e-38F
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP (-37)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 128
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 3.40282347e+38F
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 38
|
||||
|
||||
#else
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 53
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 15
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 2.2204460492503131e-16
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-1021)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 2.2250738585072014e-308
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP (-307)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 1024
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 1.7976931348623157e+308
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 308
|
||||
|
||||
#endif
|
||||
|
||||
/* Because -m3e and -m4-single-only have 32-bit doubles, we append L
|
||||
to the doubles below, so that they're not truncated. */
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a long double */
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG 53
|
||||
/* Number of decimal digits of precision in a long double */
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG 15
|
||||
/* Difference between 1.0 and the minimum long double greater than 1.0 */
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON 2.2204460492503131e-16L
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP (-1021)
|
||||
/* Minimum normalised long double */
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN 2.2250738585072014e-308L
|
||||
/* Minimum int x such that 10**x is a normalised long double */
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP (-307)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP 1024
|
||||
/* Maximum long double */
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX 1.7976931348623157e+308L
|
||||
/* Maximum int x such that 10**x is a representable long double */
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP 308
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/* The floating-point expression evaluation method.
|
||||
-1 indeterminate
|
||||
0 evaluate all operations and constants just to the range and
|
||||
precision of the type
|
||||
1 evaluate operations and constants of type float and double
|
||||
to the range and precision of the double type, evaluate
|
||||
long double operations and constants to the range and
|
||||
precision of the long double type
|
||||
2 evaluate all operations and constants to the range and
|
||||
precision of the long double type
|
||||
*/
|
||||
# undef FLT_EVAL_METHOD
|
||||
# define FLT_EVAL_METHOD 0
|
||||
|
||||
/* Number of decimal digits to enable rounding to the given number of
|
||||
decimal digits without loss of precision.
|
||||
if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX)
|
||||
else : ceil (1 + #mantissa * log10 (FLT_RADIX))
|
||||
where #mantissa is the number of bits in the mantissa of the widest
|
||||
supported floating-point type.
|
||||
*/
|
||||
# undef DECIMAL_DIG
|
||||
# define DECIMAL_DIG 17
|
||||
|
||||
#endif /* C99 */
|
||||
|
||||
#endif /* _FLOAT_H_ */
|
@ -1,153 +0,0 @@
|
||||
/* float.h for target with IEEE 32, 64 and 128 bit SPARC floating point formats
|
||||
(on sparc-linux long double is 64 bit, while on sparc64-linux 128 bit) */
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
/* Produced by enquire version 4.3, CWI, Amsterdam */
|
||||
|
||||
/* Radix of exponent representation */
|
||||
#undef FLT_RADIX
|
||||
#define FLT_RADIX 2
|
||||
/* Number of base-FLT_RADIX digits in the significand of a float */
|
||||
#undef FLT_MANT_DIG
|
||||
#define FLT_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a float */
|
||||
#undef FLT_DIG
|
||||
#define FLT_DIG 6
|
||||
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
|
||||
#undef FLT_ROUNDS
|
||||
#define FLT_ROUNDS 1
|
||||
/* Difference between 1.0 and the minimum float greater than 1.0 */
|
||||
#undef FLT_EPSILON
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
|
||||
#undef FLT_MIN_EXP
|
||||
#define FLT_MIN_EXP (-125)
|
||||
/* Minimum normalised float */
|
||||
#undef FLT_MIN
|
||||
#define FLT_MIN 1.17549435e-38F
|
||||
/* Minimum int x such that 10**x is a normalised float */
|
||||
#undef FLT_MIN_10_EXP
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
|
||||
#undef FLT_MAX_EXP
|
||||
#define FLT_MAX_EXP 128
|
||||
/* Maximum float */
|
||||
#undef FLT_MAX
|
||||
#define FLT_MAX 3.40282347e+38F
|
||||
/* Maximum int x such that 10**x is a representable float */
|
||||
#undef FLT_MAX_10_EXP
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 53
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 15
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 2.2204460492503131e-16
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-1021)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 2.2250738585072014e-308
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP (-307)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 1024
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 1.7976931348623157e+308
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 308
|
||||
|
||||
#if defined(__sparcv9) || defined(__arch64__) || defined(__LONG_DOUBLE_128__)
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a long double */
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG 113
|
||||
/* Number of decimal digits of precision in a long double */
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG 33
|
||||
/* Difference between 1.0 and the minimum long double greater than 1.0 */
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP (-16381)
|
||||
/* Minimum normalised long double */
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
|
||||
/* Minimum int x such that 10**x is a normalised long double */
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP (-4931)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP 16384
|
||||
/* Maximum long double */
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
|
||||
/* Maximum int x such that 10**x is a representable long double */
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP 4932
|
||||
|
||||
#else /* sparc32 */
|
||||
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG DBL_MANT_DIG
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG DBL_DIG
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON DBL_EPSILON
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP DBL_MIN_EXP
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN DBL_MIN
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP DBL_MAX_EXP
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX DBL_MAX
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
|
||||
|
||||
#endif /* sparc32 */
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/* The floating-point expression evaluation method.
|
||||
-1 indeterminate
|
||||
0 evaluate all operations and constants just to the range and
|
||||
precision of the type
|
||||
1 evaluate operations and constants of type float and double
|
||||
to the range and precision of the double type, evaluate
|
||||
long double operations and constants to the range and
|
||||
precision of the long double type
|
||||
2 evaluate all operations and constants to the range and
|
||||
precision of the long double type
|
||||
*/
|
||||
# undef FLT_EVAL_METHOD
|
||||
# define FLT_EVAL_METHOD 0
|
||||
|
||||
/* Number of decimal digits to enable rounding to the given number of
|
||||
decimal digits without loss of precision.
|
||||
if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX)
|
||||
else : ceil (1 + #mantissa * log10 (FLT_RADIX))
|
||||
where #mantissa is the number of bits in the mantissa of the widest
|
||||
supported floating-point type.
|
||||
*/
|
||||
# undef DECIMAL_DIG
|
||||
# if LDBL_MANT_DIG == 53
|
||||
# define DECIMAL_DIG 17
|
||||
# else
|
||||
# define DECIMAL_DIG 36
|
||||
# endif
|
||||
|
||||
#endif /* C99 */
|
||||
|
||||
#endif /* _FLOAT_H_ */
|
@ -1,159 +0,0 @@
|
||||
/* float.h for target with VAX floating point formats */
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
/* Produced by enquire version 4.3, CWI, Amsterdam */
|
||||
|
||||
/* Radix of exponent representation */
|
||||
#undef FLT_RADIX
|
||||
#define FLT_RADIX 2
|
||||
/* Number of base-FLT_RADIX digits in the significand of a float */
|
||||
#undef FLT_MANT_DIG
|
||||
#define FLT_MANT_DIG 24
|
||||
/* Number of decimal digits of precision in a float */
|
||||
#undef FLT_DIG
|
||||
#define FLT_DIG 6
|
||||
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
|
||||
#undef FLT_ROUNDS
|
||||
#define FLT_ROUNDS 1
|
||||
/* Difference between 1.0 and the minimum float greater than 1.0 */
|
||||
#undef FLT_EPSILON
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
|
||||
#undef FLT_MIN_EXP
|
||||
#define FLT_MIN_EXP (-127)
|
||||
/* Minimum normalised float */
|
||||
#undef FLT_MIN
|
||||
#define FLT_MIN 2.93873588e-39F
|
||||
/* Minimum int x such that 10**x is a normalised float */
|
||||
#undef FLT_MIN_10_EXP
|
||||
#define FLT_MIN_10_EXP (-38)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
|
||||
#undef FLT_MAX_EXP
|
||||
#define FLT_MAX_EXP 127
|
||||
/* Maximum float */
|
||||
#undef FLT_MAX
|
||||
#define FLT_MAX 1.70141173e+38F
|
||||
/* Maximum int x such that 10**x is a representable float */
|
||||
#undef FLT_MAX_10_EXP
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
#ifdef __GFLOAT
|
||||
|
||||
/* The GFLOAT numbers may be problematic since gcc uses DFLOAT */
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 53
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 15
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 2.2204460492503131e-016
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-1023)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 5.5626846462680035e-309
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP (-308)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 1023
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 8.9884656743115775e+307
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 307
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a long double */
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG 53
|
||||
/* Number of decimal digits of precision in a long double */
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG 15
|
||||
/* Difference between 1.0 and the minimum long double greater than 1.0 */
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON 2.2204460492503131e-016L
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP (-1023)
|
||||
/* Minimum normalised long double */
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN 5.5626846462680035e-309L
|
||||
/* Minimum int x such that 10**x is a normalised long double */
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP (-308)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP 1023
|
||||
/* Maximum long double */
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX 8.9884656743115775e+307L
|
||||
/* Maximum int x such that 10**x is a representable long double */
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP 307
|
||||
|
||||
#else /* !__GFLOAT */
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a double */
|
||||
#undef DBL_MANT_DIG
|
||||
#define DBL_MANT_DIG 56
|
||||
/* Number of decimal digits of precision in a double */
|
||||
#undef DBL_DIG
|
||||
#define DBL_DIG 16
|
||||
/* Difference between 1.0 and the minimum double greater than 1.0 */
|
||||
#undef DBL_EPSILON
|
||||
#define DBL_EPSILON 2.77555756156289135e-17
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
|
||||
#undef DBL_MIN_EXP
|
||||
#define DBL_MIN_EXP (-127)
|
||||
/* Minimum normalised double */
|
||||
#undef DBL_MIN
|
||||
#define DBL_MIN 2.93873587705571877e-39
|
||||
/* Minimum int x such that 10**x is a normalised double */
|
||||
#undef DBL_MIN_10_EXP
|
||||
#define DBL_MIN_10_EXP (-38)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
|
||||
#undef DBL_MAX_EXP
|
||||
#define DBL_MAX_EXP 127
|
||||
/* Maximum double */
|
||||
#undef DBL_MAX
|
||||
#define DBL_MAX 1.70141183460469227e+38
|
||||
/* Maximum int x such that 10**x is a representable double */
|
||||
#undef DBL_MAX_10_EXP
|
||||
#define DBL_MAX_10_EXP 38
|
||||
|
||||
/* Number of base-FLT_RADIX digits in the significand of a long double */
|
||||
#undef LDBL_MANT_DIG
|
||||
#define LDBL_MANT_DIG 56
|
||||
/* Number of decimal digits of precision in a long double */
|
||||
#undef LDBL_DIG
|
||||
#define LDBL_DIG 16
|
||||
/* Difference between 1.0 and the minimum long double greater than 1.0 */
|
||||
#undef LDBL_EPSILON
|
||||
#define LDBL_EPSILON 2.77555756156289135e-17L
|
||||
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
|
||||
#undef LDBL_MIN_EXP
|
||||
#define LDBL_MIN_EXP (-127)
|
||||
/* Minimum normalised long double */
|
||||
#undef LDBL_MIN
|
||||
#define LDBL_MIN 2.93873587705571877e-39L
|
||||
/* Minimum int x such that 10**x is a normalised long double */
|
||||
#undef LDBL_MIN_10_EXP
|
||||
#define LDBL_MIN_10_EXP (-38)
|
||||
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
|
||||
#undef LDBL_MAX_EXP
|
||||
#define LDBL_MAX_EXP 127
|
||||
/* Maximum long double */
|
||||
#undef LDBL_MAX
|
||||
#define LDBL_MAX 1.70141183460469227e+38L
|
||||
/* Maximum int x such that 10**x is a representable long double */
|
||||
#undef LDBL_MAX_10_EXP
|
||||
#define LDBL_MAX_10_EXP 38
|
||||
|
||||
#endif /* __GFLOAT */
|
||||
#endif /* _FLOAT_H_ */
|
@ -1,53 +0,0 @@
|
||||
/* Configuration for an i386 running 386BSD as the target machine. */
|
||||
|
||||
/* This is tested by i386gas.h. */
|
||||
#define YES_UNDERSCORES
|
||||
|
||||
#include "i386/gstabs.h"
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Dunix -D____386BSD____ -D__386BSD__ -DBSD_NET2 -Asystem=unix -Asystem=bsd"
|
||||
|
||||
/* Like the default, except no -lg. */
|
||||
#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
|
||||
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE "int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "short unsigned int"
|
||||
|
||||
#define WCHAR_UNSIGNED 1
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 16
|
||||
|
||||
/* Redefine this to use %eax instead of %edx. */
|
||||
#undef FUNCTION_PROFILER
|
||||
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
||||
{ \
|
||||
if (flag_pic) \
|
||||
{ \
|
||||
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%eax\n", \
|
||||
LPREFIX, (LABELNO)); \
|
||||
fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
fprintf (FILE, "\tmovl $%sP%d,%%eax\n", LPREFIX, (LABELNO)); \
|
||||
fprintf (FILE, "\tcall mcount\n"); \
|
||||
} \
|
||||
}
|
||||
|
||||
#undef ASM_APP_ON
|
||||
#define ASM_APP_ON "#APP\n"
|
||||
|
||||
#undef ASM_APP_OFF
|
||||
#define ASM_APP_OFF "#NO_APP\n"
|
||||
|
||||
/* 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
|
@ -1,64 +0,0 @@
|
||||
/* Definitions for IBM PS2 running AIX/386 with gas.
|
||||
From: Minh Tran-Le <TRANLE@intellicorp.com>
|
||||
Copyright (C) 1988, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/*
|
||||
* This configuration file is for gcc with gas-2.x and gnu ld 2.x
|
||||
* with aix ps/2 1.3.x.
|
||||
*/
|
||||
|
||||
/* Define USE_GAS if you have the new version of gas that can handle
|
||||
* multiple segments and .section pseudo op. This will allow gcc to
|
||||
* use the .init section for g++ ctor/dtor.
|
||||
*
|
||||
* If you don't have gas then undefined USE_GAS. You will also have
|
||||
* to use collect if you want to use g++
|
||||
*/
|
||||
#define USE_GAS
|
||||
|
||||
#include "i386/aix386ng.h"
|
||||
|
||||
/* Use crt1.o as a startup file and crtn.o as a closing file.
|
||||
And add crtbegin.o and crtend.o for ctors and dtors */
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s"
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC \
|
||||
"crtend.o%s crtn.o%s"
|
||||
|
||||
/* Removed the -K flags because the gnu ld does not handle it */
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{T*} %{z:-lm}"
|
||||
|
||||
/* Define a few machine-specific details of the implementation of
|
||||
constructors. */
|
||||
|
||||
#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
|
||||
|
||||
#undef TARGET_ASM_CONSTRUCTOR
|
||||
#define TARGET_ASM_CONSTRUCTOR ix86_svr3_asm_out_constructor
|
@ -1,139 +0,0 @@
|
||||
/* Definitions for IBM PS2 running AIX/386.
|
||||
Copyright (C) 1988, 1996, 1998 Free Software Foundation, Inc.
|
||||
Contributed by Minh Tran-Le <TRANLE@intellicorp.com>.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include "i386/i386.h"
|
||||
|
||||
/* Get the generic definitions for system V.3. */
|
||||
|
||||
#include "svr3.h"
|
||||
|
||||
/* Use the ATT assembler syntax.
|
||||
This overrides at least one macro (USER_LABEL_PREFIX) from svr3.h. */
|
||||
|
||||
#include "i386/att.h"
|
||||
|
||||
/* Use crt1.o as a startup file and crtn.o as a closing file. */
|
||||
|
||||
#define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
|
||||
#define ENDFILE_SPEC "crtn.o%s"
|
||||
|
||||
#define LIB_SPEC "%{shlib:-lc_s} -lc"
|
||||
|
||||
/* Special flags for the linker. I don't know what they do. */
|
||||
|
||||
#define LINK_SPEC "%{K} %{!K:-K} %{T*} %{z:-lm}"
|
||||
|
||||
/* Specify predefined symbols in preprocessor. */
|
||||
|
||||
#define CPP_PREDEFINES "-Dps2 -Dunix -Asystem=aix"
|
||||
|
||||
#define CPP_SPEC "%(cpp_cpu) \
|
||||
%{posix:-D_POSIX_SOURCE}%{!posix:-DAIX} -D_I386 -D_AIX -D_MBCS"
|
||||
|
||||
/* special flags for the aix assembler to generate the short form for all
|
||||
qualifying forward reference */
|
||||
/* The buggy /bin/as of aix ps/2 1.2.x cannot always handle it. */
|
||||
#if 0
|
||||
#define ASM_SPEC "-s2"
|
||||
#endif /* 0 */
|
||||
|
||||
#undef ASM_FILE_START
|
||||
#define ASM_FILE_START(FILE) \
|
||||
do { output_file_directive (FILE, main_input_filename); \
|
||||
if (optimize) \
|
||||
ASM_FILE_START_1 (FILE); \
|
||||
else \
|
||||
fprintf (FILE, "\t.noopt\n"); \
|
||||
} while (0)
|
||||
|
||||
/* This was suggested, but it shouldn't be right for DBX output. -- RMS
|
||||
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */
|
||||
|
||||
/* Writing `int' for a bitfield forces int alignment for the structure. */
|
||||
|
||||
#define PCC_BITFIELD_TYPE_MATTERS 1
|
||||
|
||||
#ifndef USE_GAS
|
||||
/* Don't write a `.optim' pseudo; this assembler
|
||||
is said to have a bug when .optim is used. */
|
||||
|
||||
#undef ASM_FILE_START_1
|
||||
#define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.noopt\n")
|
||||
#endif
|
||||
|
||||
/* Output assembler code to FILE to increment profiler label # LABELNO
|
||||
for profiling a function entry. */
|
||||
|
||||
#undef FUNCTION_PROFILER
|
||||
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
||||
fprintf (FILE, "\tleal %sP%d,%%eax\n\tcall mcount\n", LPREFIX, (LABELNO));
|
||||
|
||||
/* Note that using bss_section here caused errors
|
||||
in building shared libraries on system V.3.
|
||||
but AIX 1.2 does not have yet shareable libraries on PS2 */
|
||||
#undef ASM_OUTPUT_LOCAL
|
||||
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
|
||||
(bss_section (), \
|
||||
ASM_OUTPUT_LABEL ((FILE), (NAME)), \
|
||||
fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED)))
|
||||
|
||||
|
||||
/* Undef all the .init and .fini section stuff if we are not using gas and
|
||||
* gnu ld so that we can use collect because the standard /bin/as and /bin/ld
|
||||
* cannot handle those.
|
||||
*/
|
||||
#ifndef USE_GAS
|
||||
# undef INIT_SECTION_ASM_OP
|
||||
# undef FINI_SECTION_ASM_OP
|
||||
# undef CTORS_SECTION_ASM_OP
|
||||
# undef DTORS_SECTION_ASM_OP
|
||||
# undef TARGET_ASM_CONSTRUCTOR
|
||||
# undef TARGET_ASM_DESTRUCTOR
|
||||
# undef DO_GLOBAL_CTORS_BODY
|
||||
|
||||
# undef CTOR_LIST_BEGIN
|
||||
# define CTOR_LIST_BEGIN
|
||||
# undef CTOR_LIST_END
|
||||
# define CTOR_LIST_END
|
||||
# undef DTOR_LIST_BEGIN
|
||||
# define DTOR_LIST_BEGIN
|
||||
# undef DTOR_LIST_END
|
||||
# define DTOR_LIST_END
|
||||
|
||||
# undef CONST_SECTION_FUNCTION
|
||||
# define CONST_SECTION_FUNCTION \
|
||||
void \
|
||||
const_section () \
|
||||
{ \
|
||||
text_section(); \
|
||||
}
|
||||
|
||||
# undef EXTRA_SECTION_FUNCTIONS
|
||||
# define EXTRA_SECTION_FUNCTIONS \
|
||||
CONST_SECTION_FUNCTION
|
||||
|
||||
/* for collect2 */
|
||||
# define OBJECT_FORMAT_COFF
|
||||
# define MY_ISCOFF(magic) \
|
||||
((magic) == I386MAGIC || (magic) == I386SVMAGIC)
|
||||
|
||||
#endif /* !USE_GAS */
|
@ -1,32 +0,0 @@
|
||||
/* Configuration for an i386 running BSDI's BSD/OS (formerly known as BSD/386)
|
||||
as the target machine. */
|
||||
|
||||
/* We exist mostly to add -Dbsdi and such to the predefines. */
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Dunix -Dbsdi -D____386BSD____ -D__386BSD__\
|
||||
-DBSD_NET2 -Asystem=unix -Asystem=bsd"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef WCHAR_UNSIGNED
|
||||
#define WCHAR_UNSIGNED 0
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
|
||||
/* This is suitable for BSD/OS 3.0; we don't know about earlier releases. */
|
||||
#undef ASM_COMMENT_START
|
||||
#define ASM_COMMENT_START " #"
|
||||
|
||||
/* Until they use ELF or something that handles dwarf2 unwinds
|
||||
and initialization stuff better. */
|
||||
#define DWARF2_UNWIND_INFO 0
|
||||
|
||||
/* BSD/OS 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))
|
@ -1,257 +0,0 @@
|
||||
/* Target definitions for GNU compiler for Intel 80x86 running DG/ux
|
||||
Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2001
|
||||
Free Software Foundation, Inc.
|
||||
Currently maintained by gcc@dg-rtp.dg.com.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* for now, we are just like the sysv4 version with a
|
||||
few hacks
|
||||
*/
|
||||
|
||||
#ifndef VERSION_INFO2
|
||||
#define VERSION_INFO2 "$Revision: 1.16 $"
|
||||
#endif
|
||||
|
||||
#ifndef VERSION_STRING
|
||||
#define VERSION_STRING version_string
|
||||
#endif
|
||||
|
||||
/* Identify the compiler. */
|
||||
/* TARGET_VERSION used by toplev.c VERSION_STRING used by -midentify-revision */
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (%s%s, %s)", \
|
||||
VERSION_INFO1, VERSION_INFO2, __DATE__)
|
||||
#undef VERSION_INFO1
|
||||
#define VERSION_INFO1 "ix86 DG/ux, "
|
||||
|
||||
/* Augment TARGET_SWITCHES with the MXDB options. */
|
||||
#define MASK_STANDARD 0x40000000 /* Retain standard information */
|
||||
#define MASK_NOLEGEND 0x20000000 /* Discard legend information */
|
||||
#define MASK_EXTERNAL_LEGEND 0x10000000 /* Make external legends */
|
||||
#define MASK_IDENTIFY_REVISION 0x08000000 /* Emit 'ident' to .s */
|
||||
#define MASK_WARN_PASS_STRUCT 0x04000000 /* Warn when structures are passed */
|
||||
|
||||
#define TARGET_STANDARD (target_flags & MASK_STANDARD)
|
||||
#define TARGET_NOLEGEND (target_flags & MASK_NOLEGEND)
|
||||
#define TARGET_EXTERNAL_LEGEND (target_flags & MASK_EXTERNAL_LEGEND)
|
||||
#define TARGET_IDENTIFY_REVISION (target_flags & MASK_IDENTIFY_REVISION)
|
||||
#define TARGET_WARN_PASS_STRUCT (target_flags & MASK_WARN_PASS_STRUCT)
|
||||
|
||||
#undef SUBTARGET_SWITCHES
|
||||
#define SUBTARGET_SWITCHES \
|
||||
{ "standard", MASK_STANDARD, \
|
||||
N_("Retain standard MXDB information") }, \
|
||||
{ "legend", -MASK_NOLEGEND, \
|
||||
N_("Retain legend information") }, \
|
||||
{ "no-legend", MASK_NOLEGEND, "" }, \
|
||||
{ "external-legend", MASK_EXTERNAL_LEGEND, \
|
||||
N_("Generate external legend information") }, \
|
||||
{ "identify-revision", MASK_IDENTIFY_REVISION, \
|
||||
N_("Emit identifying info in .s file") }, \
|
||||
{ "warn-passed-structs", MASK_WARN_PASS_STRUCT, \
|
||||
N_("Warn when a function arg is a structure") },
|
||||
|
||||
#undef DWARF_DEBUGGING_INFO
|
||||
#define DWARF_DEBUGGING_INFO
|
||||
|
||||
/*
|
||||
allow -gstabs so that those who have gnu-as installed
|
||||
can debug c++ programs.
|
||||
*/
|
||||
#undef DBX_DEBUGGING_INFO
|
||||
#define DBX_DEBUGGING_INFO
|
||||
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
|
||||
|
||||
/* Override svr[34].h. Switch to the data section so that the coffsem
|
||||
symbol isn't in the text section. */
|
||||
#undef ASM_FILE_START
|
||||
#define ASM_FILE_START(FILE) \
|
||||
do { \
|
||||
output_file_directive (FILE, main_input_filename); \
|
||||
fprintf (FILE, "\t.version\t\"01.01\"\n"); \
|
||||
data_section (); \
|
||||
} while (0)
|
||||
|
||||
/* ix86 abi specified type for wchar_t */
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "long int"
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE BITS_PER_WORD
|
||||
|
||||
|
||||
/* Some machines may desire to change what optimizations are performed for
|
||||
various optimization levels. This macro, if defined, is executed once
|
||||
just after the optimization level is determined and before the remainder
|
||||
of the command options have been parsed. Values set in this macro are
|
||||
used as the default values for the other command line options.
|
||||
|
||||
LEVEL is the optimization level specified; 2 if -O2 is specified,
|
||||
1 if -O is specified, and 0 if neither is specified. */
|
||||
|
||||
/* This macro used to store 0 in flag_signed_bitfields.
|
||||
Not only is that misuse of this macro; the whole idea is wrong.
|
||||
|
||||
The GNU C dialect makes bitfields signed by default,
|
||||
regardless of machine type. Making any machine inconsistent in this
|
||||
regard is bad for portability.
|
||||
|
||||
I chose to make bitfields signed by default because this is consistent
|
||||
with the way ordinary variables are handled: `int' equals `signed int'.
|
||||
If there is a good reason to prefer making bitfields unsigned by default,
|
||||
it cannot have anything to do with the choice of machine.
|
||||
If the reason is good enough, we should change the convention for all machines.
|
||||
|
||||
-- rms, 20 July 1991. */
|
||||
|
||||
/*
|
||||
this really should go into dgux-local.h
|
||||
*/
|
||||
|
||||
#undef OPTIMIZATION_OPTIONS
|
||||
#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \
|
||||
do { \
|
||||
extern int flag_signed_bitfields; \
|
||||
flag_signed_bitfields = 0; \
|
||||
optimization_options (LEVEL,SIZE); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* The normal location of the `ld' and `as' programs */
|
||||
|
||||
#undef MD_EXEC_PREFIX
|
||||
#define MD_EXEC_PREFIX "/usr/bin/"
|
||||
|
||||
/* The normal location of the various *crt*.o files is the */
|
||||
|
||||
#undef MD_STARTFILE_PREFIX
|
||||
#define MD_STARTFILE_PREFIX "/usr/lib/"
|
||||
|
||||
/* Macros to be automatically defined.
|
||||
__CLASSIFY_TYPE__ is used in the <varargs.h> and <stdarg.h> header
|
||||
files with DG/UX revision 5.40 and later. This allows GNU CC to
|
||||
operate without installing the header files. */
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-D__ix86 -Dunix -DDGUX -D__CLASSIFY_TYPE__=2\
|
||||
-Asystem=unix -Asystem=svr4"
|
||||
|
||||
/*
|
||||
If not -ansi, -traditional, or restricting include files to one
|
||||
specific source target, specify full DG/UX features.
|
||||
*/
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%(cpp_cpu) %{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}}"
|
||||
|
||||
/* Assembler support (legends for mxdb). */
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC "\
|
||||
%{mno-legend:%{mstandard:-Wc,off}}\
|
||||
%{g:%{!mno-legend:-Wc,-fix-bb,-s\"%i\"\
|
||||
%{traditional:,-lc}%{!traditional:,-lansi-c}\
|
||||
%{mstandard:,-keep-std}\
|
||||
%{mexternal-legend:,-external}}}"
|
||||
|
||||
/* Override svr4.h. */
|
||||
|
||||
/* hassey 3/12/94 keep svr4 ASM_FINAL_SPEC allows -pipe to work */
|
||||
|
||||
/* Linker and library spec's.
|
||||
-static, -shared, -symbolic, -h* and -z* access AT&T V.4 link options.
|
||||
-svr4 instructs gcc to place /usr/lib/values-X[cat].o on link the line.
|
||||
The absence of -msvr4 indicates linking done in a COFF environment and
|
||||
adds the link script to the link line. In all environments, the first
|
||||
and last objects are crtbegin.o and crtend.o.
|
||||
When the -G link option is used (-shared and -symbolic) a final link is
|
||||
not being done. */
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC \
|
||||
"%{!shared:%{!symbolic:-lc}}"
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{z*} %{h*} %{v:-V} \
|
||||
%{static:-dn -Bstatic} \
|
||||
%{shared:-G -dy} \
|
||||
%{symbolic:-Bsymbolic -G -dy} \
|
||||
%{pg:-L/usr/lib/libp}%{p:-L/usr/lib/libp}"
|
||||
|
||||
#ifdef CROSS_COMPILE
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt1.o%s} \
|
||||
%{!pg:%{p:mcrt1.o%s} \
|
||||
%{!p:crt1.o%s}}}} \
|
||||
%{pg:gcrti.o%s}%{!pg:crti.o%s} \
|
||||
crtbegin.o%s \
|
||||
%{ansi:values-Xc.o%s} \
|
||||
%{!ansi:%{traditional:values-Xt.o%s} \
|
||||
%{!traditional:values-Xa.o%s}}"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:crtn.o%s}"
|
||||
|
||||
#else
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt1.o%s} \
|
||||
%{!pg:%{p:/lib/mcrt1.o%s} \
|
||||
%{!p:/lib/crt1.o%s}}}} \
|
||||
%{pg:gcrti.o%s}%{!pg:/lib/crti.o%s} \
|
||||
crtbegin.o%s \
|
||||
%{ansi:/lib/values-Xc.o%s} \
|
||||
%{!ansi:%{traditional:/lib/values-Xt.o%s} \
|
||||
%{!traditional:/lib/values-Xa.o%s}}"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:/lib/crtn.o}"
|
||||
|
||||
#endif /* CROSS_COMPILE */
|
||||
|
||||
/* The maximum alignment which the object file format can support.
|
||||
page alignment would seem to be enough */
|
||||
#undef MAX_OFILE_ALIGNMENT
|
||||
#define MAX_OFILE_ALIGNMENT 0x1000
|
||||
|
||||
/* Must use data section for relocatable constants when pic. */
|
||||
#undef SELECT_RTX_SECTION
|
||||
#define SELECT_RTX_SECTION(MODE,RTX,ALIGN) \
|
||||
{ \
|
||||
if (flag_pic && symbolic_operand (RTX, VOIDmode)) \
|
||||
data_section (); \
|
||||
else \
|
||||
const_section (); \
|
||||
}
|
||||
|
||||
/* This supplements FUNCTION_ARG's definition in i386.h to check
|
||||
TARGET_WARN_PASS_STRUCT */
|
||||
|
||||
#undef FUNCTION_ARG
|
||||
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
|
||||
((((MODE) == BLKmode && TARGET_WARN_PASS_STRUCT) ? \
|
||||
warning ("argument is a structure"),0 : 0), \
|
||||
(function_arg (&CUM, MODE, TYPE, NAMED)))
|
||||
|
||||
/* Add .align 1 to avoid .backalign bug in assembler */
|
||||
#undef CONST_SECTION_ASM_OP
|
||||
#define CONST_SECTION_ASM_OP "\t.section\t.rodata\n\t.align 1"
|
@ -1,35 +0,0 @@
|
||||
/* Configuration for an i386 running RTEMS on top of MS-DOS with
|
||||
DJGPP v2.x.
|
||||
|
||||
Copyright (C) 1996, 1999, 2002 Free Software Foundation, Inc.
|
||||
Contributed by Joel Sherrill (joel@OARcorp.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Specify predefined symbols in preprocessor. */
|
||||
|
||||
#ifdef CPP_PREDEFINES
|
||||
#undef CPP_PREDEFINES
|
||||
#endif
|
||||
#define CPP_PREDEFINES "-Dunix -DGO32 -DDJGPP=2 -DMSDOS -D__rtems__ \
|
||||
-Asystem=unix -Asystem=msdos -Asystem=rtems"
|
||||
|
||||
/* Generate calls to memcpy, memcmp and memset. */
|
||||
#ifndef TARGET_MEM_FUNCTIONS
|
||||
#define TARGET_MEM_FUNCTIONS
|
||||
#endif
|
@ -1,114 +0,0 @@
|
||||
/* Subroutines for insn-output.c for Windows NT.
|
||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
#include "output.h"
|
||||
#include "tree.h"
|
||||
#include "flags.h"
|
||||
|
||||
/* Return string which is the former assembler name modified with a
|
||||
suffix consisting of an atsign (@) followed by the number of bytes of
|
||||
arguments */
|
||||
|
||||
const char *
|
||||
gen_stdcall_suffix (decl)
|
||||
tree decl;
|
||||
{
|
||||
int total = 0;
|
||||
/* ??? This probably should use XSTR (XEXP (DECL_RTL (decl), 0), 0) instead
|
||||
of DECL_ASSEMBLER_NAME. */
|
||||
const char *const asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
|
||||
char *newsym;
|
||||
|
||||
if (TYPE_ARG_TYPES (TREE_TYPE (decl)))
|
||||
if (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (decl))))
|
||||
== void_type_node)
|
||||
{
|
||||
tree formal_type = TYPE_ARG_TYPES (TREE_TYPE (decl));
|
||||
|
||||
while (TREE_VALUE (formal_type) != void_type_node)
|
||||
{
|
||||
int parm_size
|
||||
= TREE_INT_CST_LOW (TYPE_SIZE (TREE_VALUE (formal_type)));
|
||||
/* Must round up to include padding. This is done the same
|
||||
way as in store_one_arg. */
|
||||
parm_size = ((parm_size + PARM_BOUNDARY - 1)
|
||||
/ PARM_BOUNDARY * PARM_BOUNDARY);
|
||||
total += parm_size;
|
||||
formal_type = TREE_CHAIN (formal_type);
|
||||
}
|
||||
}
|
||||
|
||||
newsym = xmalloc (strlen (asmname) + 10);
|
||||
sprintf (newsym, "%s@%d", asmname, total/BITS_PER_UNIT);
|
||||
return IDENTIFIER_POINTER (get_identifier (newsym));
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Turn this back on when the linker is updated to handle grouped
|
||||
.data$ sections correctly. See corresponding note in i386/interix.h.
|
||||
MK. */
|
||||
|
||||
/* Cover function for UNIQUE_SECTION. */
|
||||
|
||||
void
|
||||
i386_pe_unique_section (decl, reloc)
|
||||
tree decl;
|
||||
int reloc;
|
||||
{
|
||||
int len;
|
||||
const char *name;
|
||||
char *string,*prefix;
|
||||
|
||||
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
|
||||
/* Strip off any encoding in fnname. */
|
||||
STRIP_NAME_ENCODING (name, name);
|
||||
|
||||
/* The object is put in, for example, section .text$foo.
|
||||
The linker will then ultimately place them in .text
|
||||
(everything from the $ on is stripped). Don't put
|
||||
read-only data in .rdata section to avoid a PE linker
|
||||
bug when .rdata$* grouped sections are used in code
|
||||
without a .rdata section. */
|
||||
if (TREE_CODE (decl) == FUNCTION_DECL)
|
||||
prefix = ".text$";
|
||||
/* else if (DECL_INITIAL (decl) == 0
|
||||
|| DECL_INITIAL (decl) == error_mark_node)
|
||||
prefix = ".bss"; */
|
||||
else if (DECL_READONLY_SECTION (decl, reloc))
|
||||
#ifdef READONLY_DATA_SECTION
|
||||
prefix = ".rdata$";
|
||||
#else
|
||||
prefix = ".text$";
|
||||
#endif
|
||||
else
|
||||
prefix = ".data$";
|
||||
len = strlen (name) + strlen (prefix);
|
||||
string = alloca (len + 1);
|
||||
sprintf (string, "%s%s", prefix, name);
|
||||
|
||||
DECL_SECTION_NAME (decl) = build_string (len, string);
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
@ -1,96 +0,0 @@
|
||||
/* Assembler-independent definitions for an Intel 386 running
|
||||
Interactive Unix System V. Specifically, this is for recent versions
|
||||
that support POSIX. */
|
||||
|
||||
/* Use crt1.o, not crt0.o, as a startup file, and crtn.o as a closing file. */
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\
|
||||
%{Xp:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\
|
||||
%{!posix:%{!Xp:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}\
|
||||
%{p:-L/lib/libp} %{pg:-L/lib/libp}}}}\
|
||||
%{shlib:%{Xp:crtp1.o%s}%{posix:crtp1.o%s}%{!posix:%{!Xp:crt1.o%s}}}\
|
||||
crtbegin.o%s"
|
||||
|
||||
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
||||
|
||||
/* Library spec */
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} %{Xp:-lcposix} -lc -lg"
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{Xp:-D_POSIX_SOURCE}"
|
||||
|
||||
/* ISC 2.2 uses `char' for `wchar_t'. */
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "char"
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE BITS_PER_UNIT
|
||||
|
||||
#if 0
|
||||
/* This is apparently not true: ISC versions up to 3.0, at least, use
|
||||
the standard calling sequence in which the called function pops the
|
||||
extra arg. */
|
||||
/* caller has to pop the extra argument passed to functions that return
|
||||
structures. */
|
||||
|
||||
#undef RETURN_POPS_ARGS
|
||||
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
|
||||
((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \
|
||||
: (TARGET_RTD \
|
||||
&& (TYPE_ARG_TYPES (FUNTYPE) == 0 \
|
||||
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \
|
||||
== void_type_node))) ? (SIZE) \
|
||||
: 0)
|
||||
/* On other 386 systems, the last line looks like this:
|
||||
: (aggregate_value_p (TREE_TYPE (FUNTYPE))) ? GET_MODE_SIZE (Pmode) : 0) */
|
||||
#endif
|
||||
|
||||
/* Handle #pragma pack and #pragma weak. */
|
||||
#define HANDLE_SYSV_PRAGMA
|
||||
|
||||
/* By default, target has a 80387, uses IEEE compatible arithmetic,
|
||||
and returns float values in the 387, ie,
|
||||
(TARGET_80387 | TARGET_FLOAT_RETURNS_IN_80387)
|
||||
|
||||
ISC's software emulation of a 387 fails to handle the `fucomp'
|
||||
opcode. fucomp is only used when generating IEEE compliant code.
|
||||
So don't make TARGET_IEEE_FP default for ISC. */
|
||||
|
||||
#undef TARGET_SUBTARGET_DEFAULT
|
||||
#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS)
|
||||
|
||||
/* The ISC 2.0.2 software FPU emulator apparently can't handle
|
||||
80-bit XFmode insns, so don't generate them. */
|
||||
#undef LONG_DOUBLE_TYPE_SIZE
|
||||
#define LONG_DOUBLE_TYPE_SIZE 64
|
||||
|
||||
/* The ISC assembler does not like a .file directive with a name
|
||||
longer than 14 characters. Truncating it will not permit
|
||||
debugging to work properly, but at least we won't get an error
|
||||
message. */
|
||||
|
||||
#undef ASM_FILE_START
|
||||
#define ASM_FILE_START(FILE) \
|
||||
do { \
|
||||
const int len = strlen (main_input_filename); \
|
||||
const char *na = main_input_filename + len; \
|
||||
char shorter[15]; \
|
||||
/* NA gets MAIN_INPUT_FILENAME sans directory names. */\
|
||||
while (na > main_input_filename) \
|
||||
{ \
|
||||
if (na[-1] == '/') \
|
||||
break; \
|
||||
na--; \
|
||||
} \
|
||||
strncpy (shorter, na, 14); \
|
||||
shorter[14] = 0; \
|
||||
fprintf (FILE, "\t.file\t"); \
|
||||
output_quoted_string (FILE, shorter); \
|
||||
fprintf (FILE, "\n"); \
|
||||
} while (0)
|
||||
|
||||
/* Work around assembler forward label references generated in exception
|
||||
handling code. */
|
||||
#define DWARF2_UNWIND_INFO 0
|
@ -1,12 +0,0 @@
|
||||
/* Definitions for Intel 386 running Interactive Unix System V.
|
||||
Specifically, this is for recent versions that support POSIX;
|
||||
for version 2.0.2, use configuration option i386-sysv instead.
|
||||
(But set TARGET_DEFAULT to (MASK_80307 | MASK_FLOAT_RETURNS)
|
||||
if you do that, if you don't have a real 80387.) */
|
||||
|
||||
/* Mostly it's like AT&T Unix System V. */
|
||||
|
||||
#include "i386/sysv3.h"
|
||||
|
||||
/* But with a few changes. */
|
||||
#include "i386/isc.h"
|
@ -1,43 +0,0 @@
|
||||
/* Definitions for Intel 386 running Interactive Unix System V,
|
||||
using dbx-in-coff encapsulation.
|
||||
Specifically, this is for recent versions that support POSIX.
|
||||
Copyright (C) 1992, 1995 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Mostly it's like AT&T Unix System V with dbx-in-coff. */
|
||||
|
||||
#include "i386/svr3dbx.h"
|
||||
|
||||
/* But with a few changes. */
|
||||
#undef ENDFILE_SPEC
|
||||
#include "i386/isc.h"
|
||||
|
||||
/* Overridden defines for ifile usage. */
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!r:%{!z:svr3.ifile%s}%{z:svr3z.ifile%s}}\
|
||||
%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\
|
||||
%{Xp:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\
|
||||
%{!posix:%{!Xp:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
|
||||
%{p:-L/usr/lib/libp} %{pg:-L/usr/lib/libp}}\
|
||||
%{shlib:%{posix:crtp1.o%s}%{Xp:crtp1.o%s}%{!posix:%{!Xp:crt1.o%s}}}"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "crtn.o%s"
|
@ -1,72 +0,0 @@
|
||||
/* Definitions for Intel 386 running Linux-based GNU systems with pre-BFD
|
||||
a.out linkers.
|
||||
Copyright (C) 1995, 1997, 1998, 2002 Free Software Foundation, Inc.
|
||||
Contributed by Michael Meissner (meissner@cygnus.com)
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This is tested by i386/gas.h. */
|
||||
#define YES_UNDERSCORES
|
||||
|
||||
#include <i386/gstabs.h>
|
||||
#include <linux-aout.h> /* some common stuff */
|
||||
|
||||
#undef ASM_COMMENT_START
|
||||
#define ASM_COMMENT_START "#"
|
||||
|
||||
/* Specify predefined symbols in preprocessor. */
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Dunix -D__gnu_linux__ -Dlinux -Asystem=posix"
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{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 ""
|
@ -1,186 +0,0 @@
|
||||
/* Target definitions for GNU compiler for Intel x86 CPU running NeXTSTEP
|
||||
Copyright (C) 1993, 1995, 1996, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "i386/gas.h"
|
||||
#include "nextstep.h"
|
||||
|
||||
/* By default, target has a 80387, with IEEE FP. */
|
||||
|
||||
#undef TARGET_SUBTARGET_DEFAULT
|
||||
#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP)
|
||||
|
||||
/* Implicit library calls should use memcpy, not bcopy, etc. */
|
||||
|
||||
#define TARGET_MEM_FUNCTIONS
|
||||
|
||||
/* Machines that use the AT&T assembler syntax
|
||||
also return floating point values in an FP register.
|
||||
Define how to find the value returned by a function.
|
||||
VALTYPE is the data type of the value (as a tree).
|
||||
If the precise function being called is known, FUNC is its FUNCTION_DECL;
|
||||
otherwise, FUNC is 0. */
|
||||
|
||||
#undef VALUE_REGNO
|
||||
#define VALUE_REGNO(MODE) \
|
||||
((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode \
|
||||
? FIRST_FLOAT_REG : 0)
|
||||
|
||||
/* A C statement or statements which output an assembler instruction
|
||||
opcode to the stdio stream STREAM. The macro-operand PTR is a
|
||||
variable of type `char *' which points to the opcode name in its
|
||||
"internal" form--the form that is written in the machine description.
|
||||
|
||||
GAS version 1.38.1 doesn't understand the `repz' opcode mnemonic.
|
||||
So use `repe' instead. */
|
||||
|
||||
#undef ASM_OUTPUT_OPCODE
|
||||
#define ASM_OUTPUT_OPCODE(STREAM, PTR) \
|
||||
{ \
|
||||
if ((PTR)[0] == 'r' \
|
||||
&& (PTR)[1] == 'e' \
|
||||
&& (PTR)[2] == 'p') \
|
||||
{ \
|
||||
if ((PTR)[3] == 'z') \
|
||||
{ \
|
||||
fprintf (STREAM, "repe"); \
|
||||
(PTR) += 4; \
|
||||
} \
|
||||
else if ((PTR)[3] == 'n' && (PTR)[4] == 'z') \
|
||||
{ \
|
||||
fprintf (STREAM, "repne"); \
|
||||
(PTR) += 5; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Define macro used to output shift-double opcodes when the shift
|
||||
count is in %cl. Some assemblers require %cl as an argument;
|
||||
some don't.
|
||||
|
||||
GAS requires the %cl argument, so override unx386.h. */
|
||||
|
||||
#undef SHIFT_DOUBLE_OMITS_COUNT
|
||||
#define SHIFT_DOUBLE_OMITS_COUNT 0
|
||||
|
||||
/* Print opcodes the way that GAS expects them. */
|
||||
#define GAS_MNEMONICS 1
|
||||
|
||||
/* Names to predefine in the preprocessor for this target machine. */
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-DNeXT -Dunix -D__MACH__ -D__LITTLE_ENDIAN__ \
|
||||
-D__ARCHITECTURE__=\"i386\" -Asystem=unix -Asystem=mach"
|
||||
|
||||
/* This accounts for the return pc and saved fp on the i386. */
|
||||
|
||||
#define OBJC_FORWARDING_STACK_OFFSET 8
|
||||
#define OBJC_FORWARDING_MIN_OFFSET 8
|
||||
|
||||
/* We do not want a dot in internal labels. */
|
||||
|
||||
#undef LPREFIX
|
||||
#define LPREFIX "L"
|
||||
|
||||
#undef ASM_GENERATE_INTERNAL_LABEL
|
||||
#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
|
||||
sprintf ((BUF), "*%s%ld", (PREFIX), (long)(NUMBER))
|
||||
|
||||
#undef ASM_OUTPUT_INTERNAL_LABEL
|
||||
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
|
||||
fprintf (FILE, "%s%d:\n", PREFIX, NUM)
|
||||
|
||||
/* Output to assembler file text saying following lines
|
||||
may contain character constants, extra white space, comments, etc. */
|
||||
|
||||
#undef ASM_APP_ON
|
||||
#define ASM_APP_ON "#APP\n"
|
||||
|
||||
/* Output to assembler file text saying following lines
|
||||
no longer contain unusual constructs. */
|
||||
|
||||
#undef ASM_APP_OFF
|
||||
#define ASM_APP_OFF "#NO_APP\n"
|
||||
|
||||
#undef ASM_OUTPUT_REG_PUSH
|
||||
#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
|
||||
fprintf (FILE, "\tpushl %se%s\n", "%", reg_names[REGNO])
|
||||
|
||||
#undef ASM_OUTPUT_REG_POP
|
||||
#define ASM_OUTPUT_REG_POP(FILE,REGNO) \
|
||||
fprintf (FILE, "\tpopl %se%s\n", "%", reg_names[REGNO])
|
||||
|
||||
/* This is being overridden because the default i386 configuration
|
||||
generates calls to "_mcount". NeXT system libraries all use
|
||||
"mcount". */
|
||||
|
||||
#undef FUNCTION_PROFILER
|
||||
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
||||
{ \
|
||||
if (flag_pic) \
|
||||
{ \
|
||||
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
|
||||
LPREFIX, (LABELNO)); \
|
||||
fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \
|
||||
fprintf (FILE, "\tcall mcount\n"); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* BEGIN Calling Convention CHANGES */
|
||||
|
||||
/* These changes violate the Intel/Unix ABI. Specifically, they
|
||||
change the way that space for a block return value is passed to a
|
||||
function. The ABI says that the pointer is passed on the stack.
|
||||
We change to pass the pointer in %ebx. This makes the NeXT
|
||||
Objective-C forwarding mechanism possible to implement on an i386. */
|
||||
|
||||
/* Do NOT pass address of structure values on the stack. */
|
||||
|
||||
#undef STRUCT_VALUE_INCOMING
|
||||
#undef STRUCT_VALUE
|
||||
|
||||
/* Pass them in %ebx. */
|
||||
|
||||
#undef STRUCT_VALUE_REGNUM
|
||||
#define STRUCT_VALUE_REGNUM 3
|
||||
|
||||
/* Because we are passing the pointer in a register, we don't need to
|
||||
rely on the callee to pop it. */
|
||||
|
||||
#undef RETURN_POPS_ARGS
|
||||
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
|
||||
((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE \
|
||||
? 0 \
|
||||
: (TARGET_RTD \
|
||||
&& (TYPE_ARG_TYPES (FUNTYPE) == 0 \
|
||||
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \
|
||||
== void_type_node))) ? (SIZE) : 0)
|
||||
|
||||
/* END Calling Convention CHANGES */
|
||||
|
||||
/* NeXT 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))
|
@ -1,65 +0,0 @@
|
||||
! crti.s for OSF/1, x86; derived from sol2-ci.asm.
|
||||
|
||||
! Copyright (C) 1993, 1998 Free Software Foundation, Inc.
|
||||
! Written By Fred Fish, Nov 1992
|
||||
!
|
||||
! This file is free software; you can redistribute it and/or modify it
|
||||
! under the terms of the GNU General Public License as published by the
|
||||
! Free Software Foundation; either version 2, or (at your option) any
|
||||
! later version.
|
||||
!
|
||||
! In addition to the permissions in the GNU General Public License, the
|
||||
! Free Software Foundation gives you unlimited permission to link the
|
||||
! compiled version of this file with other programs, and to distribute
|
||||
! those programs without any restriction coming from the use of this
|
||||
! file. (The General Public License restrictions do apply in other
|
||||
! respects; for example, they cover modification of the file, and
|
||||
! distribution when not linked into another program.)
|
||||
!
|
||||
! This file is distributed in the hope that it will be useful, but
|
||||
! WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
! General Public License for more details.
|
||||
!
|
||||
! You should have received a copy of the GNU General Public License
|
||||
! along with this program; see the file COPYING. If not, write to
|
||||
! the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
! Boston, MA 02111-1307, USA.
|
||||
!
|
||||
! As a special exception, if you link this library with files
|
||||
! compiled with GCC to produce an executable, this does not cause
|
||||
! the resulting executable to be covered by the GNU General Public License.
|
||||
! This exception does not however invalidate any other reasons why
|
||||
! the executable file might be covered by the GNU General Public License.
|
||||
!
|
||||
|
||||
! This file just supplies labeled starting points for the .init and .fini
|
||||
! sections. It is linked in before the values-Xx.o files and also before
|
||||
! crtbegin.o.
|
||||
|
||||
.file "crti.s"
|
||||
.ident "GNU C crti.s"
|
||||
|
||||
.section .init
|
||||
.globl _init
|
||||
.type _init,@function
|
||||
_init:
|
||||
|
||||
.section .fini
|
||||
.globl _fini
|
||||
.type _fini,@function
|
||||
_fini:
|
||||
|
||||
.globl _init_init_routine
|
||||
.data
|
||||
.align 4
|
||||
.type _init_init_routine,@object
|
||||
.size _init_init_routine,4
|
||||
_init_init_routine:
|
||||
.long _init
|
||||
.globl _init_fini_routine
|
||||
.align 4
|
||||
.type _init_fini_routine,@object
|
||||
.size _init_fini_routine,4
|
||||
_init_fini_routine:
|
||||
.long _fini
|
@ -1,46 +0,0 @@
|
||||
! crtn.s for OSF/1, x86; derived from sol2-cn.asm.
|
||||
|
||||
! Copyright (C) 1993, 1998 Free Software Foundation, Inc.
|
||||
! Written By Fred Fish, Nov 1992
|
||||
!
|
||||
! This file is free software; you can redistribute it and/or modify it
|
||||
! under the terms of the GNU General Public License as published by the
|
||||
! Free Software Foundation; either version 2, or (at your option) any
|
||||
! later version.
|
||||
!
|
||||
! In addition to the permissions in the GNU General Public License, the
|
||||
! Free Software Foundation gives you unlimited permission to link the
|
||||
! compiled version of this file with other programs, and to distribute
|
||||
! those programs without any restriction coming from the use of this
|
||||
! file. (The General Public License restrictions do apply in other
|
||||
! respects; for example, they cover modification of the file, and
|
||||
! distribution when not linked into another program.)
|
||||
!
|
||||
! This file is distributed in the hope that it will be useful, but
|
||||
! WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
! General Public License for more details.
|
||||
!
|
||||
! You should have received a copy of the GNU General Public License
|
||||
! along with this program; see the file COPYING. If not, write to
|
||||
! the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
! Boston, MA 02111-1307, USA.
|
||||
!
|
||||
! As a special exception, if you link this library with files
|
||||
! compiled with GCC to produce an executable, this does not cause
|
||||
! the resulting executable to be covered by the GNU General Public License.
|
||||
! This exception does not however invalidate any other reasons why
|
||||
! the executable file might be covered by the GNU General Public License.
|
||||
!
|
||||
|
||||
! This file just supplies returns for the .init and .fini sections. It is
|
||||
! linked in after all other files.
|
||||
|
||||
.file "crtn.o"
|
||||
.ident "GNU C crtn.o"
|
||||
|
||||
.section .init
|
||||
ret $0x0
|
||||
|
||||
.section .fini
|
||||
ret $0x0
|
@ -1,213 +0,0 @@
|
||||
/* OSF/1 1.3 now is compitable with SVR4, so include sysv4.h, and
|
||||
put difference here.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc. */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (i386 OSF/1)");
|
||||
|
||||
#define TARGET_OSF1ELF
|
||||
|
||||
/* WORD_SWITCH_TAKES_ARG defined in svr4 is not correct. We also
|
||||
need an extra -soname */
|
||||
#undef WORD_SWITCH_TAKES_ARG
|
||||
#define WORD_SWITCH_TAKES_ARG(STR) \
|
||||
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
|
||||
|| !strcmp (STR, "Tdata") || !strcmp (STR, "Ttext") \
|
||||
|| !strcmp (STR, "Tbss") || !strcmp (STR, "soname"))
|
||||
|
||||
/* Note, -fpic and -fPIC are equivalent */
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "\
|
||||
%(cpp_cpu) \
|
||||
%{fpic: -D__SHARED__} %{fPIC: %{!fpic: -D__SHARED__}} \
|
||||
%{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
|
||||
%{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
|
||||
%{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
|
||||
%{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \
|
||||
%{.C: -D__LANGUAGE_C_PLUS_PLUS} \
|
||||
%{.m: -D__LANGUAGE_OBJECTIVE_C} \
|
||||
%{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
|
||||
|
||||
/* -mmcount or -mno-mcount should be used with -pg or -p */
|
||||
#undef CC1_SPEC
|
||||
#define CC1_SPEC "%(cc1_cpu) %{p: %{!mmcount: %{!mno-mcount: -mno-mcount }}} \
|
||||
%{!p: %{pg: %{!mmcount: %{!mno-mcount: -mno-mcount }}}}"
|
||||
|
||||
/* Note, -D__NO_UNDERSCORES__ -D__ELF__ are provided in the older version of
|
||||
OSF/1 gcc. We keep them here, so that old /usr/include/i386/asm.h works.
|
||||
*/
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES \
|
||||
"-D__NO_UNDERSCORES__ -D__ELF__ -DOSF -DOSF1 -Dunix \
|
||||
-Asystem=unix -Asystem=xpg4 -Asystem=osf1"
|
||||
|
||||
/* current OSF/1 doesn't provide separate crti.o and gcrti.o (and also, crtn.o
|
||||
and gcrtn.o) for profile. */
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "%{!shared: \
|
||||
%{!symbolic: \
|
||||
%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
|
||||
crti.o%s \
|
||||
crtbegin.o%s"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
||||
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC "%{v*: -v}"
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{v*: -v} \
|
||||
%{h*} %{z*} \
|
||||
%{dy:-call_shared} %{dn:-static} \
|
||||
%{static:-static} \
|
||||
%{shared:-shared} \
|
||||
%{call_shared:-call_shared} \
|
||||
%{symbolic:-Bsymbolic -shared -call_shared} \
|
||||
%{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \
|
||||
%{noshrlib: -static } \
|
||||
%{!noshrlib: -call_shared}}}}}}"
|
||||
|
||||
#undef MD_EXEC_PREFIX
|
||||
#define MD_EXEC_PREFIX "/usr/ccs/gcc/"
|
||||
|
||||
#undef MD_STARTFILE_PREFIX
|
||||
#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
|
||||
|
||||
/* Define this macro meaning that gcc should find the library 'libgcc.a'
|
||||
by hand, rather than passing the argument '-lgcc' to tell the linker
|
||||
to do the search */
|
||||
#define LINK_LIBGCC_SPECIAL
|
||||
|
||||
/* This goes with LINK_LIBGCC_SPECIAL, we need tell libgcc.a differently */
|
||||
#undef LIBGCC_SPEC
|
||||
#define LIBGCC_SPEC "%{!shared:%{!symbolic:libgcc.a%s}}"
|
||||
|
||||
/* Specify size_t, ptrdiff_t, and wchar_t types. */
|
||||
#undef SIZE_TYPE
|
||||
#undef PTRDIFF_TYPE
|
||||
#undef WCHAR_TYPE
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
|
||||
#define SIZE_TYPE "long unsigned int"
|
||||
#define PTRDIFF_TYPE "int"
|
||||
#define WCHAR_TYPE "unsigned int"
|
||||
#define WCHAR_TYPE_SIZE BITS_PER_WORD
|
||||
|
||||
/* Turn off long double being 96 bits. */
|
||||
#undef LONG_DOUBLE_TYPE_SIZE
|
||||
#define LONG_DOUBLE_TYPE_SIZE 64
|
||||
|
||||
/* Work with OSF/1 profile */
|
||||
#define MASK_NO_MCOUNT 000200000000 /* profiling uses mcount_ptr */
|
||||
|
||||
#define TARGET_MCOUNT ((target_flags & MASK_NO_MCOUNT) == 0)
|
||||
|
||||
#undef SUBTARGET_SWITCHES
|
||||
#define SUBTARGET_SWITCHES \
|
||||
{ "mcount", -MASK_NO_MCOUNT, \
|
||||
N_("Profiling uses mcount") }, \
|
||||
{ "no-mcount", MASK_NO_MCOUNT, "" },
|
||||
|
||||
/* This macro generates the assembly code for function entry.
|
||||
FILE is a stdio stream to output the code to.
|
||||
SIZE is an int: how many units of temporary storage to allocate.
|
||||
Refer to the array `regs_ever_live' to determine which registers
|
||||
to save; `regs_ever_live[I]' is nonzero if register number I
|
||||
is ever used in the function. This macro is responsible for
|
||||
knowing which registers should not be saved even if used.
|
||||
|
||||
We override it here to allow for the new profiling code to go before
|
||||
the prologue and the old mcount code to go after the prologue (and
|
||||
after %ebx has been set up for ELF shared library support). */
|
||||
#if 0
|
||||
#define OSF_PROFILE_BEFORE_PROLOGUE \
|
||||
(!TARGET_MCOUNT \
|
||||
&& !current_function_needs_context \
|
||||
&& (!flag_pic \
|
||||
|| !frame_pointer_needed \
|
||||
|| (!current_function_uses_pic_offset_table \
|
||||
&& !current_function_uses_const_pool)))
|
||||
#else
|
||||
#define OSF_PROFILE_BEFORE_PROLOGUE 0
|
||||
#endif
|
||||
|
||||
/* A C statement or compound statement to output to FILE some assembler code to
|
||||
call the profiling subroutine `mcount'. Before calling, the assembler code
|
||||
must load the address of a counter variable into a register where `mcount'
|
||||
expects to find the address. The name of this variable is `LP' followed by
|
||||
the number LABELNO, so you would generate the name using `LP%d' in a
|
||||
`fprintf'.
|
||||
|
||||
The details of how the address should be passed to `mcount' are determined
|
||||
by your operating system environment, not by GNU CC. To figure them out,
|
||||
compile a small program for profiling using the system's installed C
|
||||
compiler and look at the assembler code that results. */
|
||||
|
||||
#undef FUNCTION_PROFILER
|
||||
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
||||
do \
|
||||
{ \
|
||||
if (!OSF_PROFILE_BEFORE_PROLOGUE) \
|
||||
{ \
|
||||
const char *const prefix = ""; \
|
||||
const char *const lprefix = LPREFIX; \
|
||||
int labelno = LABELNO; \
|
||||
\
|
||||
/* Note that OSF/rose blew it in terms of calling mcount, \
|
||||
since OSF/rose prepends a leading underscore, but mcount's \
|
||||
doesn't. At present, we keep this kludge for ELF as well \
|
||||
to allow old kernels to build profiling. */ \
|
||||
\
|
||||
if (flag_pic \
|
||||
&& !current_function_uses_pic_offset_table \
|
||||
&& !current_function_uses_const_pool) \
|
||||
abort (); \
|
||||
\
|
||||
if (TARGET_MCOUNT && flag_pic) \
|
||||
{ \
|
||||
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
|
||||
lprefix, labelno); \
|
||||
fprintf (FILE, "\tcall *%smcount@GOT(%%ebx)\n", prefix); \
|
||||
} \
|
||||
\
|
||||
else if (TARGET_MCOUNT) \
|
||||
{ \
|
||||
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
|
||||
fprintf (FILE, "\tcall %smcount\n", prefix); \
|
||||
} \
|
||||
\
|
||||
else if (flag_pic && frame_pointer_needed) \
|
||||
{ \
|
||||
fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \
|
||||
fprintf (FILE, "\tpushl %%ecx\n"); \
|
||||
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
|
||||
lprefix, labelno); \
|
||||
fprintf (FILE, "\tmovl _mcount_ptr@GOT(%%ebx),%%eax\n"); \
|
||||
fprintf (FILE, "\tcall *(%%eax)\n"); \
|
||||
fprintf (FILE, "\tpopl %%eax\n"); \
|
||||
} \
|
||||
\
|
||||
else if (frame_pointer_needed) \
|
||||
{ \
|
||||
fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \
|
||||
fprintf (FILE, "\tpushl %%ecx\n"); \
|
||||
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
|
||||
fprintf (FILE, "\tcall *_mcount_ptr\n"); \
|
||||
fprintf (FILE, "\tpopl %%eax\n"); \
|
||||
} \
|
||||
\
|
||||
else \
|
||||
abort (); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#if defined (CROSS_COMPILE) && defined (HOST_BITS_PER_INT) && defined (HOST_BITS_PER_LONG) && defined (HOST_BITS_PER_LONGLONG)
|
||||
#if (HOST_BITS_PER_INT==32) && (HOST_BITS_PER_LONG==64) && (HOST_BITS_PER_LONGLONG==64)
|
||||
#define REAL_ARITHMETIC
|
||||
#endif
|
||||
#endif
|
@ -1,7 +0,0 @@
|
||||
/* Target definitions for GNU compiler for Intel 80386 running OSF/1 1.3+
|
||||
with gas and gdb. */
|
||||
|
||||
/* Use stabs instead of DWARF debug format. */
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||
|
@ -1,79 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler.
|
||||
Intel 386 (OSF/1 with ELF) version.
|
||||
Copyright (C) 1993 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "config/i386/osfrose.h"
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem=xpg4"
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%(cpp_cpu) \
|
||||
%{mrose: -D__ROSE__ %{!pic-none: -D__SHARED__}} \
|
||||
%{!mrose: -D__ELF__ %{fpic: -D__SHARED__}} \
|
||||
%{mno-underscores: -D__NO_UNDERSCORES__} \
|
||||
%{!mrose: %{!munderscores: -D__NO_UNDERSCORES__}} \
|
||||
%{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
|
||||
%{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
|
||||
%{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
|
||||
%{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \
|
||||
%{.C: -D__LANGUAGE_C_PLUS_PLUS} \
|
||||
%{.m: -D__LANGUAGE_OBJECTIVE_C} \
|
||||
%{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
|
||||
|
||||
/* Turn on -pic-extern by default for OSF/rose, -fpic for ELF. */
|
||||
#undef CC1_SPEC
|
||||
#define CC1_SPEC "%(cc1_cpu) \
|
||||
%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
|
||||
%{!melf: %{!mrose: -melf }} \
|
||||
%{!mrose: %{!munderscores: %{!mno-underscores: -mno-underscores }} \
|
||||
%{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount-ptr }}}} \
|
||||
%{mrose: %{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount }}} \
|
||||
%{pic-extern: -mhalf-pic } %{pic-lib: -mhalf-pic } \
|
||||
%{!pic-extern: %{!pic-lib: %{pic-none: -mno-half-pic} %{!pic-none: -mhalf-pic}}} \
|
||||
%{pic-calls: } %{pic-names*: }}"
|
||||
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC "%{v*: -v}"
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{v*: -v} \
|
||||
%{mrose: %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \
|
||||
%{nostdlib} %{noshrlib} %{glue}} \
|
||||
%{!mrose: %{dy} %{dn} %{glue: } \
|
||||
%{h*} %{z*} \
|
||||
%{static:-dn -Bstatic} \
|
||||
%{shared:-G -dy} \
|
||||
%{symbolic:-Bsymbolic -G -dy} \
|
||||
%{G:-G} \
|
||||
%{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \
|
||||
%{noshrlib: -dn } %{pic-none: -dn } \
|
||||
%{!noshrlib: %{!pic-none: -dy}}}}}}}}"
|
||||
|
||||
#undef TARGET_VERSION_INTERNAL
|
||||
#undef TARGET_VERSION
|
||||
|
||||
#undef I386_VERSION
|
||||
#define I386_VERSION " 80386, ELF objects"
|
||||
|
||||
#define TARGET_VERSION_INTERNAL(STREAM) fputs (I386_VERSION, STREAM)
|
||||
#define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr)
|
||||
|
||||
#undef OBJECT_FORMAT_ROSE
|
@ -1,720 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler.
|
||||
Intel 386 (OSF/1 with OSF/rose) version.
|
||||
Copyright (C) 1991, 1992, 1993, 1996, 1998, 1999, 2000
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "halfpic.h"
|
||||
#include "i386/gstabs.h"
|
||||
|
||||
#define OSF_OS
|
||||
|
||||
#undef WORD_SWITCH_TAKES_ARG
|
||||
#define WORD_SWITCH_TAKES_ARG(STR) \
|
||||
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) || !strcmp (STR, "pic-names"))
|
||||
|
||||
/* This defines which switch letters take arguments. On svr4, most of
|
||||
the normal cases (defined in gcc.c) apply, and we also have -h* and
|
||||
-z* options (for the linker). */
|
||||
|
||||
#define SWITCH_TAKES_ARG(CHAR) \
|
||||
(DEFAULT_SWITCH_TAKES_ARG(CHAR) \
|
||||
|| (CHAR) == 'h' \
|
||||
|| (CHAR) == 'z')
|
||||
|
||||
#define MASK_HALF_PIC 010000000000 /* Mask for half-pic code */
|
||||
#define MASK_HALF_PIC_DEBUG 004000000000 /* Debug flag */
|
||||
#define MASK_ELF 002000000000 /* ELF not rose */
|
||||
#define MASK_NO_UNDERSCORES 000400000000 /* suppress leading _ */
|
||||
#define MASK_LARGE_ALIGN 000200000000 /* align to >word boundaries */
|
||||
#define MASK_NO_MCOUNT 000100000000 /* profiling uses mcount_ptr */
|
||||
|
||||
#define TARGET_HALF_PIC (target_flags & MASK_HALF_PIC)
|
||||
#define TARGET_DEBUG (target_flags & MASK_HALF_PIC_DEBUG)
|
||||
#define HALF_PIC_DEBUG TARGET_DEBUG
|
||||
#define TARGET_ELF (target_flags & MASK_ELF)
|
||||
#define TARGET_ROSE ((target_flags & MASK_ELF) == 0)
|
||||
#define TARGET_UNDERSCORES ((target_flags & MASK_NO_UNDERSCORES) == 0)
|
||||
#define TARGET_LARGE_ALIGN (target_flags & MASK_LARGE_ALIGN)
|
||||
#define TARGET_MCOUNT ((target_flags & MASK_NO_MCOUNT) == 0)
|
||||
|
||||
#undef SUBTARGET_SWITCHES
|
||||
#define SUBTARGET_SWITCHES \
|
||||
{ "half-pic", MASK_HALF_PIC, \
|
||||
N_("Emit half-PIC code") }, \
|
||||
{ "no-half-pic", -MASK_HALF_PIC, "" }, \
|
||||
{ "debug-half-pic", MASK_HALF_PIC_DEBUG, \
|
||||
0 /* intentionally undoc */ }, \
|
||||
{ "debugb", MASK_HALF_PIC_DEBUG, \
|
||||
0 /* intentionally undoc */ }, \
|
||||
{ "elf", MASK_ELF, \
|
||||
N_("Emit ELF object code") }, \
|
||||
{ "rose", -MASK_ELF, \
|
||||
N_("Emit ROSE object code") }, \
|
||||
{ "underscores", -MASK_NO_UNDERSCORES, \
|
||||
N_("Symbols have a leading underscore") }, \
|
||||
{ "no-underscores", MASK_NO_UNDERSCORES, "" }, \
|
||||
{ "large-align", MASK_LARGE_ALIGN, \
|
||||
N_("Align to >word boundaries") }, \
|
||||
{ "no-large-align", -MASK_LARGE_ALIGN, "" }, \
|
||||
{ "mcount", -MASK_NO_MCOUNT, \
|
||||
N_("Use mcount for profiling") }, \
|
||||
{ "mcount-ptr", MASK_NO_MCOUNT, \
|
||||
N_("Use mcount_ptr for profiling") }, \
|
||||
{ "no-mcount", MASK_NO_MCOUNT, "" },
|
||||
|
||||
/* OSF/rose uses stabs, not dwarf. */
|
||||
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||
|
||||
#ifndef DWARF_DEBUGGING_INFO
|
||||
#define DWARF_DEBUGGING_INFO /* enable dwarf debugging for testing */
|
||||
#endif
|
||||
|
||||
/* Handle #pragma weak and #pragma pack. */
|
||||
|
||||
#define HANDLE_SYSV_PRAGMA
|
||||
#define SUPPORTS_WEAK TARGET_ELF
|
||||
|
||||
/* Change default predefines. */
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem=xpg4"
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%(cpp_cpu) \
|
||||
%{!melf: -D__ROSE__ %{!pic-none: -D__SHARED__}} \
|
||||
%{melf: -D__ELF__ %{fpic: -D__SHARED__}} \
|
||||
%{mno-underscores: -D__NO_UNDERSCORES__} \
|
||||
%{melf: %{!munderscores: -D__NO_UNDERSCORES__}} \
|
||||
%{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
|
||||
%{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
|
||||
%{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
|
||||
%{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \
|
||||
%{.C: -D__LANGUAGE_C_PLUS_PLUS} \
|
||||
%{.m: -D__LANGUAGE_OBJECTIVE_C} \
|
||||
%{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
|
||||
|
||||
/* Turn on -pic-extern by default for OSF/rose, -fpic for ELF. */
|
||||
#undef CC1_SPEC
|
||||
#define CC1_SPEC "%(cc1_cpu) \
|
||||
%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
|
||||
%{!melf: %{!mrose: -mrose }} \
|
||||
%{melf: %{!munderscores: %{!mno-underscores: -mno-underscores }} \
|
||||
%{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount-ptr }}}} \
|
||||
%{!melf: %{!munderscores: %{!mno-underscores: -munderscores }} \
|
||||
%{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount }}} \
|
||||
%{pic-extern: -mhalf-pic } %{pic-lib: -mhalf-pic } \
|
||||
%{!pic-extern: %{!pic-lib: %{pic-none: -mno-half-pic} %{!pic-none: -mhalf-pic}}} \
|
||||
%{pic-calls: } %{pic-names*: }}"
|
||||
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC "%{v*: -v}"
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{v*: -v} \
|
||||
%{!melf: %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \
|
||||
%{nostdlib} %{noshrlib} %{glue}} \
|
||||
%{melf: %{dy} %{dn} %{glue: } \
|
||||
%{h*} %{z*} \
|
||||
%{static:-dn -Bstatic} \
|
||||
%{shared:-G -dy} \
|
||||
%{symbolic:-Bsymbolic -G -dy} \
|
||||
%{G:-G} \
|
||||
%{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \
|
||||
%{noshrlib: -dn } %{pic-none: -dn } \
|
||||
%{!noshrlib: %{!pic-none: -dy}}}}}}}}"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "-lc"
|
||||
|
||||
#undef LIBG_SPEC
|
||||
#define LIBG_SPEC ""
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
|
||||
|
||||
#undef TARGET_VERSION_INTERNAL
|
||||
#undef TARGET_VERSION
|
||||
|
||||
#define I386_VERSION " 80386, OSF/rose objects"
|
||||
|
||||
#define TARGET_VERSION_INTERNAL(STREAM) fputs (I386_VERSION, STREAM)
|
||||
#define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr)
|
||||
|
||||
#undef MD_EXEC_PREFIX
|
||||
#define MD_EXEC_PREFIX "/usr/ccs/gcc/"
|
||||
|
||||
#undef MD_STARTFILE_PREFIX
|
||||
#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
|
||||
|
||||
/* Specify size_t, ptrdiff_t, and wchar_t types. */
|
||||
#undef SIZE_TYPE
|
||||
#undef PTRDIFF_TYPE
|
||||
#undef WCHAR_TYPE
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
|
||||
#define SIZE_TYPE "long unsigned int"
|
||||
#define PTRDIFF_TYPE "int"
|
||||
#define WCHAR_TYPE "unsigned int"
|
||||
#define WCHAR_TYPE_SIZE BITS_PER_WORD
|
||||
|
||||
/* Define this macro if the system header files support C++ as well
|
||||
as C. This macro inhibits the usual method of using system header
|
||||
files in C++, which is to pretend that the file's contents are
|
||||
enclosed in `extern "C" {...}'. */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
/* Turn off long double being 96 bits. */
|
||||
#undef LONG_DOUBLE_TYPE_SIZE
|
||||
#define LONG_DOUBLE_TYPE_SIZE 64
|
||||
|
||||
#define OSF_PROFILE_BEFORE_PROLOGUE \
|
||||
(!TARGET_MCOUNT \
|
||||
&& !current_function_needs_context \
|
||||
&& (!flag_pic \
|
||||
|| !frame_pointer_needed \
|
||||
|| (!current_function_uses_pic_offset_table \
|
||||
&& !current_function_uses_const_pool)))
|
||||
|
||||
/* A C statement or compound statement to output to FILE some assembler code to
|
||||
call the profiling subroutine `mcount'. Before calling, the assembler code
|
||||
must load the address of a counter variable into a register where `mcount'
|
||||
expects to find the address. The name of this variable is `LP' followed by
|
||||
the number LABELNO, so you would generate the name using `LP%d' in a
|
||||
`fprintf'.
|
||||
|
||||
The details of how the address should be passed to `mcount' are determined
|
||||
by your operating system environment, not by GNU CC. To figure them out,
|
||||
compile a small program for profiling using the system's installed C
|
||||
compiler and look at the assembler code that results. */
|
||||
|
||||
#undef FUNCTION_PROFILER
|
||||
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
||||
do \
|
||||
{ \
|
||||
if (!OSF_PROFILE_BEFORE_PROLOGUE) \
|
||||
{ \
|
||||
const char *const prefix = (TARGET_UNDERSCORES) ? "_" : ""; \
|
||||
const char *const lprefix = LPREFIX; \
|
||||
int labelno = LABELNO; \
|
||||
\
|
||||
/* Note that OSF/rose blew it in terms of calling mcount, \
|
||||
since OSF/rose prepends a leading underscore, but mcount's \
|
||||
doesn't. At present, we keep this kludge for ELF as well \
|
||||
to allow old kernels to build profiling. */ \
|
||||
\
|
||||
if (flag_pic \
|
||||
&& !current_function_uses_pic_offset_table \
|
||||
&& !current_function_uses_const_pool) \
|
||||
abort (); \
|
||||
\
|
||||
if (TARGET_MCOUNT && flag_pic) \
|
||||
{ \
|
||||
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
|
||||
lprefix, labelno); \
|
||||
fprintf (FILE, "\tcall *%smcount@GOT(%%ebx)\n", prefix); \
|
||||
} \
|
||||
\
|
||||
else if (TARGET_MCOUNT && HALF_PIC_P ()) \
|
||||
{ \
|
||||
rtx symdef; \
|
||||
\
|
||||
HALF_PIC_EXTERNAL ("mcount"); \
|
||||
symdef = HALF_PIC_PTR (gen_rtx_SYMBOL_REF (Pmode, "mcount")); \
|
||||
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
|
||||
fprintf (FILE, "\tcall *%s%s\n", prefix, XSTR (symdef, 0)); \
|
||||
} \
|
||||
\
|
||||
else if (TARGET_MCOUNT) \
|
||||
{ \
|
||||
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
|
||||
fprintf (FILE, "\tcall %smcount\n", prefix); \
|
||||
} \
|
||||
\
|
||||
else if (flag_pic && frame_pointer_needed) \
|
||||
{ \
|
||||
fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \
|
||||
fprintf (FILE, "\tpushl %%ecx\n"); \
|
||||
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
|
||||
lprefix, labelno); \
|
||||
fprintf (FILE, "\tmovl _mcount_ptr@GOT(%%ebx),%%eax\n"); \
|
||||
fprintf (FILE, "\tcall *(%%eax)\n"); \
|
||||
fprintf (FILE, "\tpopl %%eax\n"); \
|
||||
} \
|
||||
\
|
||||
else if (frame_pointer_needed) \
|
||||
{ \
|
||||
fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \
|
||||
fprintf (FILE, "\tpushl %%ecx\n"); \
|
||||
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \
|
||||
fprintf (FILE, "\tcall *_mcount_ptr\n"); \
|
||||
fprintf (FILE, "\tpopl %%eax\n"); \
|
||||
} \
|
||||
\
|
||||
else \
|
||||
abort (); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* A C function or functions which are needed in the library to
|
||||
support block profiling. When support goes into libc, undo
|
||||
the #if 0. */
|
||||
|
||||
#if 0
|
||||
#undef BLOCK_PROFILING_CODE
|
||||
#define BLOCK_PROFILING_CODE
|
||||
#endif
|
||||
|
||||
/* 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 ((TARGET_UNDERSCORES) ? "L" : ".L")
|
||||
|
||||
/* 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%s%ld", (TARGET_UNDERSCORES) ? "" : ".", \
|
||||
(PREFIX), (long)(NUMBER))
|
||||
|
||||
/* This is how to output an internal numbered label where
|
||||
PREFIX is the class of label and NUM is the number within the class. */
|
||||
|
||||
#undef ASM_OUTPUT_INTERNAL_LABEL
|
||||
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
|
||||
fprintf (FILE, "%s%s%d:\n", (TARGET_UNDERSCORES) ? "" : ".", \
|
||||
PREFIX, NUM)
|
||||
|
||||
/* The prefix to add to user-visible assembler symbols. */
|
||||
|
||||
/* target_flags is not accessible by the preprocessor */
|
||||
#undef USER_LABEL_PREFIX
|
||||
#define USER_LABEL_PREFIX "_"
|
||||
|
||||
/* This is how to output a reference to a user-level label named NAME. */
|
||||
|
||||
#undef ASM_OUTPUT_LABELREF
|
||||
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
|
||||
fprintf (FILE, "%s%s", (TARGET_UNDERSCORES) ? "_" : "", NAME)
|
||||
|
||||
/* This is how to output an element of a case-vector that is relative.
|
||||
This is only used for PIC code. See comments by the `casesi' insn in
|
||||
i386.md for an explanation of the expression this outputs. */
|
||||
|
||||
#undef ASM_OUTPUT_ADDR_DIFF_ELT
|
||||
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
|
||||
fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
|
||||
|
||||
/* Output a definition */
|
||||
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
|
||||
do \
|
||||
{ \
|
||||
fprintf ((FILE), "%s", SET_ASM_OP); \
|
||||
assemble_name (FILE, LABEL1); \
|
||||
fprintf (FILE, ","); \
|
||||
assemble_name (FILE, LABEL2); \
|
||||
fprintf (FILE, "\n"); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* A C expression to output text to align the location counter in the
|
||||
way that is desirable at a point in the code that is reached only
|
||||
by jumping.
|
||||
|
||||
This macro need not be defined if you don't want any special
|
||||
alignment to be done at such a time. Most machine descriptions do
|
||||
not currently define the macro. */
|
||||
|
||||
#undef LABEL_ALIGN_AFTER_BARRIER
|
||||
#define LABEL_ALIGN_AFTER_BARRIER(LABEL) \
|
||||
((!TARGET_LARGE_ALIGN && i386_align_jumps > 2) ? 2 : i386_align_jumps)
|
||||
|
||||
/* A C expression to output text to align the location counter in the
|
||||
way that is desirable at the beginning of a loop.
|
||||
|
||||
This macro need not be defined if you don't want any special
|
||||
alignment to be done at such a time. Most machine descriptions do
|
||||
not currently define the macro. */
|
||||
|
||||
#undef LOOP_ALIGN
|
||||
#define LOOP_ALIGN(LABEL) (i386_align_loops)
|
||||
|
||||
/* A C statement to output to the stdio stream STREAM an assembler
|
||||
command to advance the location counter to a multiple of 2 to the
|
||||
POWER bytes. POWER will be a C expression of type `int'. */
|
||||
|
||||
#undef ASM_OUTPUT_ALIGN
|
||||
#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
|
||||
fprintf (STREAM, "\t.align\t%d\n", \
|
||||
(!TARGET_LARGE_ALIGN && (POWER) > 2) ? 2 : (POWER))
|
||||
|
||||
/* A C expression that is 1 if the RTX X is a constant which is a
|
||||
valid address. On most machines, this can be defined as
|
||||
`CONSTANT_P (X)', but a few machines are more restrictive in
|
||||
which constant addresses are supported.
|
||||
|
||||
`CONSTANT_P' accepts integer-values expressions whose values are
|
||||
not explicitly known, such as `symbol_ref', `label_ref', and
|
||||
`high' expressions and `const' arithmetic expressions, in
|
||||
addition to `const_int' and `const_double' expressions. */
|
||||
|
||||
#define CONSTANT_ADDRESS_P_ORIG(X) \
|
||||
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|
||||
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|
||||
|| GET_CODE (X) == HIGH)
|
||||
|
||||
#undef CONSTANT_ADDRESS_P
|
||||
#define CONSTANT_ADDRESS_P(X) \
|
||||
((CONSTANT_ADDRESS_P_ORIG (X)) && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X)))
|
||||
|
||||
/* Nonzero if the constant value X is a legitimate general operand.
|
||||
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
|
||||
|
||||
#undef LEGITIMATE_CONSTANT_P
|
||||
#define LEGITIMATE_CONSTANT_P(X) \
|
||||
(!HALF_PIC_P () \
|
||||
|| GET_CODE (X) == CONST_DOUBLE \
|
||||
|| GET_CODE (X) == CONST_INT \
|
||||
|| !HALF_PIC_ADDRESS_P (X))
|
||||
|
||||
/* Sometimes certain combinations of command options do not make sense
|
||||
on a particular target machine. You can define a macro
|
||||
`OVERRIDE_OPTIONS' to take account of this. This macro, if
|
||||
defined, is executed once just after all the command options have
|
||||
been parsed. */
|
||||
|
||||
#undef SUBTARGET_OVERRIDE_OPTIONS
|
||||
#define SUBTARGET_OVERRIDE_OPTIONS \
|
||||
{ \
|
||||
/* \
|
||||
if (TARGET_ELF && TARGET_HALF_PIC) \
|
||||
{ \
|
||||
target_flags &= ~MASK_HALF_PIC; \
|
||||
flag_pic = 1; \
|
||||
} \
|
||||
*/ \
|
||||
\
|
||||
if (TARGET_ROSE && flag_pic) \
|
||||
{ \
|
||||
target_flags |= MASK_HALF_PIC; \
|
||||
flag_pic = 0; \
|
||||
} \
|
||||
\
|
||||
if (TARGET_HALF_PIC) \
|
||||
half_pic_init (); \
|
||||
}
|
||||
|
||||
/* Define this macro if references to a symbol must be treated
|
||||
differently depending on something about the variable or
|
||||
function named by the symbol (such as what section it is in).
|
||||
|
||||
The macro definition, if any, is executed immediately after the
|
||||
rtl for DECL has been created and stored in `DECL_RTL (DECL)'.
|
||||
The value of the rtl will be a `mem' whose address is a
|
||||
`symbol_ref'.
|
||||
|
||||
The usual thing for this macro to do is to a flag in the
|
||||
`symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
|
||||
name string in the `symbol_ref' (if one bit is not enough
|
||||
information).
|
||||
|
||||
The best way to modify the name string is by adding text to the
|
||||
beginning, with suitable punctuation to prevent any ambiguity.
|
||||
Allocate the new name in `saveable_obstack'. You will have to
|
||||
modify `ASM_OUTPUT_LABELREF' to remove and decode the added text
|
||||
and output the name accordingly.
|
||||
|
||||
You can also check the information stored in the `symbol_ref' in
|
||||
the definition of `GO_IF_LEGITIMATE_ADDRESS' or
|
||||
`PRINT_OPERAND_ADDRESS'. */
|
||||
|
||||
#undef ENCODE_SECTION_INFO
|
||||
#define ENCODE_SECTION_INFO(DECL) \
|
||||
do \
|
||||
{ \
|
||||
if (HALF_PIC_P ()) \
|
||||
HALF_PIC_ENCODE (DECL); \
|
||||
\
|
||||
else if (flag_pic) \
|
||||
{ \
|
||||
rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
|
||||
? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
|
||||
SYMBOL_REF_FLAG (XEXP (rtl, 0)) \
|
||||
= (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
|
||||
|| ! TREE_PUBLIC (DECL)); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
||||
/* On most machines, read-only variables, constants, and jump tables
|
||||
are placed in the text section. If this is not the case on your
|
||||
machine, this macro should be defined to be the name of a function
|
||||
(either `data_section' or a function defined in `EXTRA_SECTIONS')
|
||||
that switches to the section to be used for read-only items.
|
||||
|
||||
If these items should be placed in the text section, this macro
|
||||
should not be defined. */
|
||||
|
||||
#if 0
|
||||
#undef READONLY_DATA_SECTION
|
||||
#define READONLY_DATA_SECTION() \
|
||||
do \
|
||||
{ \
|
||||
if (TARGET_ELF) \
|
||||
{ \
|
||||
if (in_section != in_rodata) \
|
||||
{ \
|
||||
fprintf (asm_out_file, "\t.section \"rodata\"\n"); \
|
||||
in_section = in_rodata; \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
text_section (); \
|
||||
} \
|
||||
while (0)
|
||||
#endif
|
||||
|
||||
/* A list of names for sections other than the standard two, which are
|
||||
`in_text' and `in_data'. You need not define this macro on a
|
||||
system with no other sections (that GCC needs to use). */
|
||||
|
||||
#undef EXTRA_SECTIONS
|
||||
#define EXTRA_SECTIONS in_rodata, in_data1
|
||||
|
||||
/* Given a decl node or constant node, choose the section to output it in
|
||||
and select that section. */
|
||||
|
||||
#undef SELECT_RTX_SECTION
|
||||
#define SELECT_RTX_SECTION(MODE, RTX, ALIGN) \
|
||||
do \
|
||||
{ \
|
||||
if (MODE == Pmode && HALF_PIC_P () && HALF_PIC_ADDRESS_P (RTX)) \
|
||||
data_section (); \
|
||||
else \
|
||||
readonly_data_section (); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#undef SELECT_SECTION
|
||||
#define SELECT_SECTION(DECL, RELOC, ALIGN) \
|
||||
{ \
|
||||
if (RELOC && HALF_PIC_P ()) \
|
||||
data_section (); \
|
||||
\
|
||||
else if (TREE_CODE (DECL) == STRING_CST) \
|
||||
{ \
|
||||
if (flag_writable_strings) \
|
||||
data_section (); \
|
||||
else \
|
||||
readonly_data_section (); \
|
||||
} \
|
||||
\
|
||||
else if (TREE_CODE (DECL) != VAR_DECL) \
|
||||
readonly_data_section (); \
|
||||
\
|
||||
else if (!TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \
|
||||
|| !DECL_INITIAL (DECL) \
|
||||
|| (DECL_INITIAL (DECL) != error_mark_node \
|
||||
&& !TREE_CONSTANT (DECL_INITIAL (DECL)))) \
|
||||
data_section (); \
|
||||
\
|
||||
else \
|
||||
readonly_data_section (); \
|
||||
}
|
||||
|
||||
|
||||
/* 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"
|
||||
|
||||
/* This is how we tell the assembler that a symbol is weak. */
|
||||
|
||||
#define ASM_WEAKEN_LABEL(FILE,NAME) \
|
||||
do { fputs ("\t.weak\t", 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). */
|
||||
|
||||
#define TYPE_OPERAND_FMT "@%s"
|
||||
|
||||
/* A C statement (sans semicolon) to output to the stdio stream
|
||||
STREAM any text necessary for declaring the name NAME of an
|
||||
initialized variable which is being defined. This macro must
|
||||
output the label definition (perhaps using `ASM_OUTPUT_LABEL').
|
||||
The argument DECL is the `VAR_DECL' tree node representing the
|
||||
variable.
|
||||
|
||||
If this macro is not defined, then the variable name is defined
|
||||
in the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */
|
||||
|
||||
#undef ASM_DECLARE_OBJECT_NAME
|
||||
#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
|
||||
do \
|
||||
{ \
|
||||
ASM_OUTPUT_LABEL(STREAM,NAME); \
|
||||
HALF_PIC_DECLARE (NAME); \
|
||||
if (TARGET_ELF) \
|
||||
{ \
|
||||
fprintf (STREAM, "%s", TYPE_ASM_OP); \
|
||||
assemble_name (STREAM, NAME); \
|
||||
putc (',', STREAM); \
|
||||
fprintf (STREAM, TYPE_OPERAND_FMT, "object"); \
|
||||
putc ('\n', STREAM); \
|
||||
size_directive_output = 0; \
|
||||
if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
|
||||
{ \
|
||||
size_directive_output = 1; \
|
||||
fprintf (STREAM, "%s", SIZE_ASM_OP); \
|
||||
assemble_name (STREAM, NAME); \
|
||||
fprintf (STREAM, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
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. */
|
||||
|
||||
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
|
||||
do { \
|
||||
const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
|
||||
if (TARGET_ELF \
|
||||
&& !flag_inhibit_size_directive && DECL_SIZE (DECL) \
|
||||
&& ! AT_END && TOP_LEVEL \
|
||||
&& DECL_INITIAL (DECL) == error_mark_node \
|
||||
&& !size_directive_output) \
|
||||
{ \
|
||||
fprintf (FILE, "%s", SIZE_ASM_OP); \
|
||||
assemble_name (FILE, name); \
|
||||
fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* This is how to declare a function name. */
|
||||
|
||||
#undef ASM_DECLARE_FUNCTION_NAME
|
||||
#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \
|
||||
do \
|
||||
{ \
|
||||
ASM_OUTPUT_LABEL(STREAM,NAME); \
|
||||
HALF_PIC_DECLARE (NAME); \
|
||||
if (TARGET_ELF) \
|
||||
{ \
|
||||
fprintf (STREAM, "%s", TYPE_ASM_OP); \
|
||||
assemble_name (STREAM, NAME); \
|
||||
putc (',', STREAM); \
|
||||
fprintf (STREAM, TYPE_OPERAND_FMT, "function"); \
|
||||
putc ('\n', STREAM); \
|
||||
ASM_DECLARE_RESULT (STREAM, DECL_RESULT (DECL)); \
|
||||
} \
|
||||
} \
|
||||
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
|
||||
|
||||
/* This is how to declare the size of a function. */
|
||||
|
||||
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
|
||||
do \
|
||||
{ \
|
||||
if (TARGET_ELF && !flag_inhibit_size_directive) \
|
||||
{ \
|
||||
char label[256]; \
|
||||
static int labelno; \
|
||||
labelno++; \
|
||||
ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
|
||||
ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
|
||||
fprintf (FILE, "%s", SIZE_ASM_OP); \
|
||||
assemble_name (FILE, (FNAME)); \
|
||||
fprintf (FILE, ","); \
|
||||
assemble_name (FILE, label); \
|
||||
fprintf (FILE, "-"); \
|
||||
assemble_name (FILE, (FNAME)); \
|
||||
putc ('\n', FILE); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define IDENT_ASM_OP "\t.ident\t"
|
||||
|
||||
/* Allow #sccs in preprocessor. */
|
||||
|
||||
#define SCCS_DIRECTIVE
|
||||
|
||||
/* This says what to print at the end of the assembly file */
|
||||
#undef ASM_FILE_END
|
||||
#define ASM_FILE_END(STREAM) \
|
||||
do \
|
||||
{ \
|
||||
if (HALF_PIC_P ()) \
|
||||
HALF_PIC_FINISH (STREAM); \
|
||||
ix86_asm_file_end (STREAM); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Tell collect that the object format is OSF/rose. */
|
||||
#define OBJECT_FORMAT_ROSE
|
||||
|
||||
/* Tell collect where the appropriate binaries are. */
|
||||
#define REAL_NM_FILE_NAME "/usr/ccs/gcc/bfd-nm"
|
||||
#define REAL_STRIP_FILE_NAME "/usr/ccs/bin/strip"
|
||||
|
||||
/* Define this macro meaning that gcc should find the library 'libgcc.a'
|
||||
by hand, rather than passing the argument '-lgcc' to tell the linker
|
||||
to do the search */
|
||||
#define LINK_LIBGCC_SPECIAL
|
||||
|
||||
/* Generate calls to memcpy, etc., not bcopy, etc. */
|
||||
#define TARGET_MEM_FUNCTIONS
|
||||
|
||||
/* 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
|
||||
|
||||
/* Map i386 registers to the numbers dwarf expects. Of course this is
|
||||
different from what stabs expects. */
|
||||
|
||||
#undef DBX_REGISTER_NUMBER
|
||||
#define DBX_REGISTER_NUMBER(n) ((write_symbols == DWARF_DEBUG) \
|
||||
? svr4_dbx_register_map[n] \
|
||||
: dbx_register_map[n])
|
@ -1,25 +0,0 @@
|
||||
/* Definitions for rtems targeting an Intel i386 using coff.
|
||||
Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
|
||||
Contributed by Joel Sherrill (joel@OARcorp.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Specify predefined symbols in preprocessor. */
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems"
|
@ -1,46 +0,0 @@
|
||||
/* Definitions for Sequent Intel 386 using GAS.
|
||||
Copyright (C) 1992 Free Software Foundation, Inc.
|
||||
|
||||
/* Mostly it's like a Sequent 386 without GAS. */
|
||||
|
||||
#include "i386/sequent.h"
|
||||
|
||||
/* A C statement or statements which output an assembler instruction
|
||||
opcode to the stdio stream STREAM. The macro-operand PTR is a
|
||||
variable of type `char *' which points to the opcode name in its
|
||||
"internal" form--the form that is written in the machine description.
|
||||
|
||||
GAS version 1.38.1 doesn't understand the `repz' opcode mnemonic.
|
||||
So use `repe' instead. */
|
||||
|
||||
#undef ASM_OUTPUT_OPCODE
|
||||
#define ASM_OUTPUT_OPCODE(STREAM, PTR) \
|
||||
{ \
|
||||
if ((PTR)[0] == 'r' \
|
||||
&& (PTR)[1] == 'e' \
|
||||
&& (PTR)[2] == 'p') \
|
||||
{ \
|
||||
if ((PTR)[3] == 'z') \
|
||||
{ \
|
||||
fprintf (STREAM, "repe"); \
|
||||
(PTR) += 4; \
|
||||
} \
|
||||
else if ((PTR)[3] == 'n' && (PTR)[4] == 'z') \
|
||||
{ \
|
||||
fprintf (STREAM, "repne"); \
|
||||
(PTR) += 5; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Define macro used to output shift-double opcodes when the shift
|
||||
count is in %cl. Some assemblers require %cl as an argument;
|
||||
some don't.
|
||||
|
||||
GAS requires the %cl argument, so override i386/unix.h. */
|
||||
|
||||
#undef SHIFT_DOUBLE_OMITS_COUNT
|
||||
#define SHIFT_DOUBLE_OMITS_COUNT 0
|
||||
|
||||
/* Print opcodes the way that GAS expects them. */
|
||||
#define GAS_MNEMONICS 1
|
@ -1,45 +0,0 @@
|
||||
/* Sequent DYNIX/ptx 1.x (SVr3) */
|
||||
|
||||
#include "i386/sysv3.h"
|
||||
|
||||
/* Sequent Symmetry SVr3 doesn't have crtn.o; crt1.o doesn't work
|
||||
but crt0.o does. */
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{pg:gcrt0.o%s}\
|
||||
%{!pg:%{posix:%{p:mcrtp0.o%s}%{!p:crtp0.o%s}}\
|
||||
%{!posix:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} crtbegin.o%s\
|
||||
%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC \
|
||||
"%{posix:-lcposix}\
|
||||
%{shlib:-lc_s}\
|
||||
%{fshared-data:-lpps -lseq} -lc crtend.o%s"
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} -D_SEQUENT_=1"
|
||||
|
||||
/* Although the .init section is used, it is not automatically invoked.
|
||||
This because the _start() function in /lib/crt0.o never calls anything
|
||||
from the .init section */
|
||||
#define INVOKE__main
|
||||
|
||||
/* Assembler pseudo-op for initialized shared variables (.shdata). */
|
||||
#undef SHARED_SECTION_ASM_OP
|
||||
#define SHARED_SECTION_ASM_OP "\t.section .shdata, \"ws\""
|
||||
|
||||
/* Assembler pseudo-op for uninitialized shared global variables (.shbss). */
|
||||
#undef ASM_OUTPUT_SHARED_COMMON
|
||||
#define ASM_OUTPUT_SHARED_COMMON(FILE, NAME, SIZE, ROUNDED) \
|
||||
( fputs(".comm ", (FILE)), \
|
||||
assemble_name((FILE), (NAME)), \
|
||||
fprintf((FILE), ",%u,-3\n", (SIZE)))
|
||||
|
||||
/* Assembler pseudo-op for uninitialized shared local variables (.shbss). */
|
||||
#undef SHARED_BSS_SECTION_ASM_OP
|
||||
#define SHARED_BSS_SECTION_ASM_OP "\t.section .shbss, \"bs\""
|
||||
|
||||
/* seq2-sysv3.h used to define HAVE_ATEXIT, so I assume ptx1 needs this... */
|
||||
#define NEED_ATEXIT
|
@ -1,7 +0,0 @@
|
||||
/* Sequent DYNIX/ptx 2.x (SVr3) */
|
||||
|
||||
#include "i386/seq-sysv3.h"
|
||||
|
||||
/* Use atexit for static destructors, instead of defining
|
||||
our own exit function. */
|
||||
#undef NEED_ATEXIT
|
@ -1,147 +0,0 @@
|
||||
/* Definitions for Sequent Intel 386.
|
||||
Copyright (C) 1988, 1994, 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "i386/i386.h"
|
||||
|
||||
/* Use the BSD assembler syntax. */
|
||||
|
||||
#include "i386/bsd.h"
|
||||
|
||||
/* By default, don't use IEEE compatible arithmetic comparisons
|
||||
because the assembler can't handle the fucom insn.
|
||||
Return float values in the 387. */
|
||||
|
||||
#undef TARGET_SUBTARGET_DEFAULT
|
||||
#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS)
|
||||
|
||||
/* Specify predefined symbols in preprocessor. */
|
||||
|
||||
#define CPP_PREDEFINES "-Dunix -Dsequent -Asystem=unix"
|
||||
|
||||
/* Pass -Z and -ZO options to the linker. */
|
||||
|
||||
#define LINK_SPEC "%{Z*}"
|
||||
|
||||
#if 0 /* Dynix 3.1 is said to accept -L. */
|
||||
/* Dynix V3.0.12 doesn't accept -L at all. */
|
||||
|
||||
#define LINK_LIBGCC_SPECIAL
|
||||
#endif
|
||||
|
||||
/* Link with libg.a when debugging, for dbx's sake. */
|
||||
|
||||
#define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} "
|
||||
|
||||
/* We don't want to output SDB debugging information. */
|
||||
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
|
||||
/* We want to output DBX debugging information. */
|
||||
|
||||
#define DBX_DEBUGGING_INFO
|
||||
|
||||
/* Sequent Symmetry has size_t defined as int in /usr/include/sys/types.h */
|
||||
#define SIZE_TYPE "int"
|
||||
|
||||
/* gcc order is ax, dx, cx, bx, si, di, bp, sp, st, st.
|
||||
* dbx order is ax, dx, cx, st(0), st(1), bx, si, di, st(2), st(3),
|
||||
* st(4), st(5), st(6), st(7), sp, bp */
|
||||
|
||||
#undef DBX_REGISTER_NUMBER
|
||||
#define DBX_REGISTER_NUMBER(n) \
|
||||
((n) < 3 ? (n) : (n) < 6 ? (n) + 2 \
|
||||
: (n) == 6 ? 15 : (n) == 7 ? 14 : 3)
|
||||
|
||||
/* malcolmp@hydra.maths.unsw.EDU.AU says these two definitions
|
||||
fix trouble in dbx. */
|
||||
#undef DBX_OUTPUT_LBRAC
|
||||
#define DBX_OUTPUT_LBRAC(file,name) \
|
||||
fprintf (asmfile, "%s%d,0,%d,", ASM_STABN_OP, N_LBRAC, depth); \
|
||||
assemble_name (asmfile, buf); \
|
||||
fprintf (asmfile, "\n");
|
||||
|
||||
#undef DBX_OUTPUT_RBRAC
|
||||
#define DBX_OUTPUT_RBRAC(file,name) \
|
||||
fprintf (asmfile, "%s%d,0,%d,", ASM_STABN_OP, N_RBRAC, depth); \
|
||||
assemble_name (asmfile, buf); \
|
||||
fprintf (asmfile, "\n");
|
||||
|
||||
/* Prevent anything from being allocated in the register pair cx/bx,
|
||||
since that would confuse GDB. */
|
||||
|
||||
#undef HARD_REGNO_MODE_OK
|
||||
#define HARD_REGNO_MODE_OK(REGNO, MODE) \
|
||||
(((REGNO) < 2 ? 1 \
|
||||
: (REGNO) < 4 ? 1 \
|
||||
: FP_REGNO_P (REGNO) ? (GET_MODE_CLASS (MODE) == MODE_FLOAT \
|
||||
|| GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT) \
|
||||
: (MODE) != QImode) \
|
||||
&& ! (REGNO == 2 && GET_MODE_UNIT_SIZE (MODE) > 4))
|
||||
|
||||
/* Output assembler code to FILE to increment profiler label # LABELNO
|
||||
for profiling a function entry. */
|
||||
|
||||
#undef FUNCTION_PROFILER
|
||||
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
||||
fprintf (FILE, "\tmovl $.LP%d,%%eax\n\tcall mcount\n", (LABELNO));
|
||||
|
||||
/* Assembler pseudo-op for shared data segment. */
|
||||
#define SHARED_SECTION_ASM_OP "\t.shdata"
|
||||
|
||||
/* A C statement or statements which output an assembler instruction
|
||||
opcode to the stdio stream STREAM. The macro-operand PTR is a
|
||||
variable of type `char *' which points to the opcode name in its
|
||||
"internal" form--the form that is written in the machine description.
|
||||
|
||||
The Sequent assembler (identified as "Balance 8000 Assembler
|
||||
07/17/85 3.90" by "as -v") does not understand the `movs[bwl]' string
|
||||
move mnemonics - it uses `smov[bwl]' instead. Change "movs" into
|
||||
"smov", carefully avoiding the sign-extend opcodes. */
|
||||
|
||||
#define ASM_OUTPUT_OPCODE(STREAM, PTR) \
|
||||
{ \
|
||||
if ((PTR)[0] == 'm' \
|
||||
&& (PTR)[1] == 'o' \
|
||||
&& (PTR)[2] == 'v' \
|
||||
&& (PTR)[3] == 's' \
|
||||
&& ((PTR)[4] == 'b' || (PTR)[4] == 'w' || (PTR)[4] == 'l') \
|
||||
&& ((PTR)[5] == ' ' || (PTR)[5] == '\t'|| (PTR)[5] == '\0')) \
|
||||
{ \
|
||||
fprintf (STREAM, "smov"); \
|
||||
(PTR) += 4; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* 10-Aug-92 pes Local labels are prefixed with ".L" */
|
||||
#undef LPREFIX
|
||||
#define LPREFIX ".L"
|
||||
|
||||
#undef ASM_GENERATE_INTERNAL_LABEL
|
||||
#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)\
|
||||
sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER))
|
||||
|
||||
#undef ASM_OUTPUT_INTERNAL_LABEL
|
||||
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)\
|
||||
fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
|
||||
|
||||
/* The native compiler passes the address of the returned structure in eax. */
|
||||
#undef STRUCT_VALUE
|
||||
#undef STRUCT_VALUE_INCOMING
|
||||
#define STRUCT_VALUE_REGNUM 0
|
@ -1,11 +0,0 @@
|
||||
/* Definitions of target machine for GNU compiler, for SPARC running
|
||||
Solaris 2 with GNU as up to 2.9.5.0.12.
|
||||
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
*/
|
||||
|
||||
#ifndef GAS_REJECTS_MINUS_S
|
||||
#define GAS_REJECTS_MINUS_S 1
|
||||
#endif
|
||||
|
||||
/* Assume sol2.h will be included afterwards. */
|
@ -1,83 +0,0 @@
|
||||
/* Definitions for Intel 386 running SunOS 4.0.
|
||||
Copyright (C) 1988, 1995 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include "i386/i386.h"
|
||||
|
||||
/* Use the Sun assembler syntax. */
|
||||
|
||||
#include "i386/sun386.h"
|
||||
|
||||
/* Use crt0.o as a startup file. */
|
||||
|
||||
#define STARTFILE_SPEC \
|
||||
"%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
|
||||
|
||||
#define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \
|
||||
%{g:-lg} %{sun386:}"
|
||||
/* That last item is just to prevent a spurious error. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{!nostdlib:%{!r*:%{!e*:-e _start}}} -dc -dp %{static:-Bstatic}"
|
||||
|
||||
/* Extra switches to give the assembler. */
|
||||
|
||||
#define ASM_SPEC "%{R} -i386 %{keep-local-as-symbols:-L}"
|
||||
|
||||
/* Specify predefined symbols in preprocessor. */
|
||||
|
||||
#define CPP_PREDEFINES "-Dunix -Dsun386 -Dsun -Asystem=unix -Asystem=bsd"
|
||||
|
||||
/* Allow #sccs in preprocessor. */
|
||||
|
||||
#define SCCS_DIRECTIVE
|
||||
|
||||
/* Output #ident as a .ident. */
|
||||
|
||||
#define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME);
|
||||
|
||||
/* We don't want to output SDB debugging information. */
|
||||
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
|
||||
/* We want to output DBX debugging information. */
|
||||
|
||||
#define DBX_DEBUGGING_INFO
|
||||
|
||||
/* Implicit library calls should use memcpy, not bcopy, etc. */
|
||||
|
||||
#define TARGET_MEM_FUNCTIONS
|
||||
|
||||
/* Force structure alignment to the type used for a bitfield. */
|
||||
|
||||
#define PCC_BITFIELD_TYPE_MATTERS 1
|
||||
|
||||
/* This is partly guess. */
|
||||
|
||||
#undef DBX_REGISTER_NUMBER
|
||||
#define DBX_REGISTER_NUMBER(n) \
|
||||
((n) == 0 ? 11 : (n) == 1 ? 9 : (n) == 2 ? 10 : (n) == 3 ? 8 \
|
||||
: (n) == 4 ? 5 : (n) == 5 ? 4 : (n) == 6 ? 6 : (n))
|
||||
|
||||
/* Every debugger symbol must be in the text section.
|
||||
Otherwise the assembler or the linker screws up. */
|
||||
|
||||
#define DEBUG_SYMS_TEXT
|
@ -1,141 +0,0 @@
|
||||
/* Definitions for Sun assembler syntax for the Intel 80386.
|
||||
Copyright (C) 1988, 1996, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* Include common aspects of all 386 Unix assemblers. */
|
||||
#include "i386/unix.h"
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (80386, Sun syntax)");
|
||||
|
||||
/* Define the syntax of instructions and addresses. */
|
||||
|
||||
/* Prefix for internally generated assembler labels. */
|
||||
#define LPREFIX ".L"
|
||||
|
||||
/* Define the syntax of pseudo-ops, labels and comments. */
|
||||
|
||||
/* Assembler pseudos to introduce constants of various size. */
|
||||
|
||||
#define ASM_SHORT "\t.value\t"
|
||||
#define ASM_LONG "\t.long\t"
|
||||
#define ASM_QUAD "\t.quad\t" /* Should not be used for 32bit compilation. */
|
||||
|
||||
|
||||
/* How to output an ASCII string constant. */
|
||||
|
||||
#define ASM_OUTPUT_ASCII(FILE, PTR, SIZE) \
|
||||
do \
|
||||
{ size_t i = 0, limit = (SIZE); \
|
||||
while (i < limit) \
|
||||
{ if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n"); \
|
||||
fputs ("\t.byte\t", (FILE)); } \
|
||||
else fprintf ((FILE), ","); \
|
||||
fprintf ((FILE), "0x%x", ((PTR)[i++] & 0377)) ;} \
|
||||
fprintf ((FILE), "\n"); \
|
||||
} while (0)
|
||||
|
||||
/* Output at beginning of assembler file. */
|
||||
/* The .file command should always begin the output. */
|
||||
|
||||
#undef ASM_FILE_START
|
||||
#define ASM_FILE_START(FILE) \
|
||||
do { \
|
||||
{ \
|
||||
const int len = strlen (main_input_filename); \
|
||||
const char *na = main_input_filename + len; \
|
||||
char shorter[15]; \
|
||||
/* NA gets MAIN_INPUT_FILENAME sans directory names. */\
|
||||
while (na > main_input_filename) \
|
||||
{ \
|
||||
if (na[-1] == '/') \
|
||||
break; \
|
||||
na--; \
|
||||
} \
|
||||
strncpy (shorter, na, 14); \
|
||||
shorter[14] = 0; \
|
||||
fprintf (FILE, "\t.file\t"); \
|
||||
output_quoted_string (FILE, shorter); \
|
||||
fprintf (FILE, "\n"); \
|
||||
} \
|
||||
fprintf (FILE, "\t.version\t\"%s %s\"\n", \
|
||||
lang_hooks.name, version_string); \
|
||||
if (optimize) ASM_FILE_START_1 (FILE); \
|
||||
} while (0)
|
||||
|
||||
#define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.optim\n")
|
||||
|
||||
/* This is how to output an assembler line
|
||||
that says to advance the location counter
|
||||
to a multiple of 2**LOG bytes. */
|
||||
|
||||
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
||||
if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
|
||||
|
||||
/* This is how to output an assembler line
|
||||
that says to advance the location counter by SIZE bytes. */
|
||||
|
||||
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
|
||||
fprintf ((FILE), "\t.set\t.,.+%u\n", (SIZE))
|
||||
|
||||
/* Output before read-only data. */
|
||||
|
||||
#undef TEXT_SECTION_ASM_OP
|
||||
#define TEXT_SECTION_ASM_OP "\t.text"
|
||||
|
||||
/* Output before writable data. */
|
||||
|
||||
#undef DATA_SECTION_ASM_OP
|
||||
#define DATA_SECTION_ASM_OP "\t.data"
|
||||
|
||||
/* Define the syntax of labels and symbol definitions/declarations. */
|
||||
|
||||
/* This says how to output an assembler line
|
||||
to define a global common symbol. */
|
||||
|
||||
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
|
||||
( fputs (".comm ", (FILE)), \
|
||||
assemble_name ((FILE), (NAME)), \
|
||||
fprintf ((FILE), ",%u\n", (ROUNDED)))
|
||||
|
||||
/* This says how to output an assembler line
|
||||
to define a local common symbol. */
|
||||
|
||||
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
|
||||
( fputs (".lcomm ", (FILE)), \
|
||||
assemble_name ((FILE), (NAME)), \
|
||||
fprintf ((FILE), ",%u\n", (ROUNDED)))
|
||||
|
||||
/* 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'. */
|
||||
|
||||
#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
|
||||
sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER))
|
||||
|
||||
/* The prefix to add to user-visible assembler symbols. */
|
||||
|
||||
#define USER_LABEL_PREFIX ""
|
||||
|
||||
/* This is how to output an internal numbered label where
|
||||
PREFIX is the class of label and NUM is the number within the class. */
|
||||
|
||||
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
|
||||
fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
|
@ -1,11 +0,0 @@
|
||||
#
|
||||
# target makefile for dgux
|
||||
#
|
||||
EXTRA_PARTS=crti.o crtbegin.o crtend.o
|
||||
|
||||
crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES)
|
||||
sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s
|
||||
$(GCC_FOR_TARGET) -c -o crti.o crti.s
|
||||
|
||||
# Don't run fixproto
|
||||
STMP_FIXPROTO =
|
@ -1,8 +0,0 @@
|
||||
# Specify other dirs of system header files to be fixed.
|
||||
OTHER_FIXINCLUDES_DIRS= /LocalDeveloper/Headers
|
||||
|
||||
# <limits.h> is sometimes in /usr/include/ansi/limits.h.
|
||||
LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h -o -f $(SYSTEM_HEADER_DIR)/ansi/limits.h ]
|
||||
|
||||
nextstep.o: $(srcdir)/config/nextstep.c $(CONFIG_H) flags.h tree.h
|
||||
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/nextstep.c
|
@ -1,2 +0,0 @@
|
||||
# If compiling with the osf gcc, avoid sharing code.
|
||||
TCFLAGS = -pic-none
|
@ -1,18 +0,0 @@
|
||||
# Assemble startup files.
|
||||
crti.o: $(srcdir)/config/i386/osf1-ci.asm $(GCC_PASSES)
|
||||
sed -e '/^!/d' <$(srcdir)/config/i386/osf1-ci.asm >crti.s
|
||||
$(GCC_FOR_TARGET) -c -o crti.o crti.s
|
||||
crtn.o: $(srcdir)/config/i386/osf1-cn.asm $(GCC_PASSES)
|
||||
sed -e '/^!/d' <$(srcdir)/config/i386/osf1-cn.asm >crtn.s
|
||||
$(GCC_FOR_TARGET) -c -o crtn.o crtn.s
|
||||
|
||||
# The pushl in CTOR initialization interferes with frame pointer elimination.
|
||||
|
||||
# We need to use -fPIC when we are using gcc to compile the routines in
|
||||
# crtstuff.c. This is only really needed when we are going to use gcc/g++
|
||||
# to produce a shared library, but since we don't know ahead of time when
|
||||
# we will be doing that, we just always use -fPIC when compiling the
|
||||
# routines in crtstuff.c.
|
||||
|
||||
CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer
|
||||
TARGET_LIBGCC2_CFLAGS = -fPIC
|
@ -1,23 +0,0 @@
|
||||
# The pushl in CTOR initialization interferes with frame pointer elimination.
|
||||
CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer
|
||||
CRTSTUFF_T_CFLAGS_S = -fno-omit-frame-pointer
|
||||
|
||||
#
|
||||
# I am still a little unsure of the multilib architecture. The following
|
||||
# 4 lines are based on advice from meissner@cygnus.com.
|
||||
#
|
||||
MULTILIB_OPTIONS = fPIC
|
||||
MULTILIB_DIRNAMES = pic
|
||||
MULTILIB_EXCEPTIONS = *fPIC*
|
||||
MULTILIB_MATCHES = fPIC=fpic
|
||||
MULTILIB_EXTRA_OPTS =
|
||||
|
||||
LIBGCC=stmp-multilib
|
||||
INSTALL_LIBGCC=install-multilib
|
||||
|
||||
crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES)
|
||||
sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s
|
||||
$(GCC_FOR_TARGET) -c -o crti.o crti.s
|
||||
|
||||
# See all the declarations.
|
||||
FIXPROTO_DEFINES = -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=2
|
@ -1,80 +0,0 @@
|
||||
/* Definitions for Intel 386 running system V, using gas.
|
||||
Copyright (C) 1992, 1995 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <i386/gas.h>
|
||||
|
||||
/* Add stuff that normally comes from i386v.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", (ROUNDED)); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
fputs (".lcomm ", (FILE)); \
|
||||
assemble_name ((FILE), (NAME)); \
|
||||
fprintf ((FILE), ",%u\n", (ROUNDED)); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Add stuff that normally comes from i386v.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
|
@ -1,28 +0,0 @@
|
||||
/* Operating system specific defines to be used when targeting GCC
|
||||
for NeXTSTEP.
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
extern void nextstep_asm_out_constructor PARAMS ((struct rtx_def *, int));
|
||||
extern void nextstep_asm_out_destructor PARAMS ((struct rtx_def *, int));
|
||||
extern int handle_pragma PARAMS ((int(*)(void), void (*)(int), const char *));
|
||||
extern void constructor_section PARAMS ((void));
|
||||
extern void destructor_section PARAMS ((void));
|
||||
extern void nextstep_exception_section PARAMS ((void));
|
||||
extern void nextstep_eh_frame_section PARAMS ((void));
|
@ -1,117 +0,0 @@
|
||||
/* Functions for generic NeXT as target machine for GNU C compiler.
|
||||
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1996, 1997, 1998,
|
||||
2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "flags.h"
|
||||
#include "tree.h"
|
||||
#include "rtl.h"
|
||||
#include "toplev.h"
|
||||
#include "output.h"
|
||||
#include "tm_p.h"
|
||||
|
||||
/* Make everything that used to go in the text section really go there. */
|
||||
|
||||
int flag_no_mach_text_sections = 0;
|
||||
|
||||
#define OPT_STRCMP(opt) (!strncmp (opt, p, sizeof (opt)-1))
|
||||
|
||||
/* 1 if handle_pragma has been called yet. */
|
||||
|
||||
static int pragma_initialized;
|
||||
|
||||
/* Initial setting of `optimize'. */
|
||||
|
||||
static int initial_optimize_flag;
|
||||
|
||||
/* Called from check_newline via the macro HANDLE_PRAGMA.
|
||||
FINPUT is the source file input stream.
|
||||
CH is the first character after `#pragma'.
|
||||
The result is 1 if the pragma was handled. */
|
||||
|
||||
int
|
||||
handle_pragma (p_getc, p_ungetc, pname)
|
||||
int (* p_getc) PARAMS ((void)) ATTRIBUTE_UNUSED;
|
||||
void (* p_ungetc) PARAMS ((int)) ATTRIBUTE_UNUSED;
|
||||
const char *pname;
|
||||
{
|
||||
int retval = 0;
|
||||
|
||||
/* Record initial setting of optimize flag, so we can restore it. */
|
||||
if (!pragma_initialized)
|
||||
{
|
||||
pragma_initialized = 1;
|
||||
initial_optimize_flag = optimize;
|
||||
}
|
||||
|
||||
if (strcmp (pname, "CC_OPT_ON") == 0)
|
||||
{
|
||||
optimize = 1;
|
||||
warning ("optimization turned on");
|
||||
retval = 1;
|
||||
}
|
||||
else if (strcmp (pname, "CC_OPT_OFF") == 0)
|
||||
{
|
||||
optimize = 0;
|
||||
warning ("optimization turned off");
|
||||
retval = 1;
|
||||
}
|
||||
else if (strcmp (pname, "CC_OPT_RESTORE") == 0)
|
||||
{
|
||||
extern int initial_optimize_flag;
|
||||
|
||||
if (optimize != initial_optimize_flag)
|
||||
optimize = initial_optimize_flag;
|
||||
warning ("optimization level restored");
|
||||
retval = 1;
|
||||
}
|
||||
else if (strcmp (pname, "CC_WRITABLE_STRINGS") == 0)
|
||||
flag_writable_strings = retval = 1;
|
||||
else if (strcmp (pname, "CC_NON_WRITABLE_STRINGS") == 0)
|
||||
flag_writable_strings = 0, retval = 1;
|
||||
else if (strcmp (pname, "CC_NO_MACH_TEXT_SECTIONS") == 0)
|
||||
flag_no_mach_text_sections = retval = 1;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
nextstep_asm_out_constructor (symbol, priority)
|
||||
rtx symbol;
|
||||
int priority ATTRIBUTE_UNUSED;
|
||||
{
|
||||
constructor_section ();
|
||||
assemble_align (POINTER_SIZE);
|
||||
assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
|
||||
fprintf (asm_out_file, ".reference .constructors_used\n");
|
||||
}
|
||||
|
||||
void
|
||||
nextstep_asm_out_destructor (symbol, priority)
|
||||
rtx symbol;
|
||||
int priority ATTRIBUTE_UNUSED;
|
||||
{
|
||||
destructor_section ();
|
||||
assemble_align (POINTER_SIZE);
|
||||
assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
|
||||
fprintf (asm_out_file, ".reference .destructors_used\n");
|
||||
}
|
||||
|
@ -1,581 +0,0 @@
|
||||
/* Operating system specific defines to be used when targeting GCC
|
||||
for NeXTSTEP.
|
||||
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1996, 1997,
|
||||
1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Use new NeXT include file search path.
|
||||
In a cross compiler with NeXT as target, don't expect
|
||||
the host to use Next's directory scheme. */
|
||||
|
||||
#ifndef CROSS_COMPILE
|
||||
#undef INCLUDE_DEFAULTS
|
||||
#define INCLUDE_DEFAULTS \
|
||||
{ \
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, \
|
||||
{ LOCAL_INCLUDE_DIR, 0, 0, 1 }, \
|
||||
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 1 }, \
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 }, \
|
||||
/* These are for fixincludes-fixed ansi/bsd headers \
|
||||
which wouldn't be found otherwise. \
|
||||
(The use of string catenation here is OK since \
|
||||
NeXT's native compiler is derived from GCC.) */ \
|
||||
{ GCC_INCLUDE_DIR "/ansi", 0, 0, 0 }, \
|
||||
{ GCC_INCLUDE_DIR "/bsd", 0, 0, 0 }, \
|
||||
{ "/NextDeveloper/Headers", 0, 0, 0 }, \
|
||||
{ "/NextDeveloper/Headers/ansi", 0, 0, 0 }, \
|
||||
{ "/NextDeveloper/Headers/bsd", 0, 0, 0 }, \
|
||||
{ "/LocalDeveloper/Headers", 0, 0, 0 }, \
|
||||
{ "/LocalDeveloper/Headers/ansi", 0, 0, 0 }, \
|
||||
{ "/LocalDeveloper/Headers/bsd", 0, 0, 0 }, \
|
||||
{ "/NextDeveloper/2.0CompatibleHeaders", 0, 0, 0 }, \
|
||||
{ STANDARD_INCLUDE_DIR, 0, 0, 0 }, \
|
||||
{ "/usr/include/bsd", 0, 0, 0 }, \
|
||||
{ 0, 0, 0, 0 } \
|
||||
}
|
||||
#else /* CROSS_COMPILE */
|
||||
#undef INCLUDE_DEFAULTS
|
||||
#define INCLUDE_DEFAULTS \
|
||||
{ \
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, \
|
||||
{ GPLUSPLUS_INCLUDE_DIR, 0, 1, 1 }, \
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 }, \
|
||||
{ GCC_INCLUDE_DIR "/ansi", 0, 0, 0 }, \
|
||||
{ GCC_INCLUDE_DIR "/bsd", 0, 0, 0 }, \
|
||||
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 1 }, \
|
||||
{ TOOL_INCLUDE_DIR "/ansi", 0, 0, 0 }, \
|
||||
{ TOOL_INCLUDE_DIR "/bsd", 0, 0, 0 }, \
|
||||
{ "/usr/include/bsd", 0, 0, 0 }, \
|
||||
{ 0, 0, 0, 0 } \
|
||||
}
|
||||
#endif /* CROSS_COMPILE */
|
||||
|
||||
#undef EXTRA_FORMAT_FUNCTIONS
|
||||
#define EXTRA_FORMAT_FUNCTIONS \
|
||||
"NXPrintf", FALSE, 2, FALSE, \
|
||||
"NXScanf", TRUE, 2, FALSE, \
|
||||
"NXVPrintf", FALSE, 2, TRUE, \
|
||||
"NXVScanf", TRUE, 2, TRUE, \
|
||||
"DPSPrintf", FALSE, 2, FALSE, \
|
||||
"bsd_sprintf", FALSE, 2, FALSE, \
|
||||
"bsd_vsprintf", FALSE, 2, TRUE,
|
||||
|
||||
/* Make -fnext-runtime the default. */
|
||||
|
||||
#define NEXT_OBJC_RUNTIME
|
||||
|
||||
/* Enable recent gcc to compile under the old gcc in Next release 1.0. */
|
||||
|
||||
#define __inline inline
|
||||
|
||||
/* wchar_t is unsigned short */
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "short unsigned int"
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE (BITS_PER_WORD / 2)
|
||||
|
||||
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
|
||||
we want to retain compatibility with older gcc versions. */
|
||||
|
||||
#undef DEFAULT_PCC_STRUCT_RETURN
|
||||
#define DEFAULT_PCC_STRUCT_RETURN 0
|
||||
|
||||
/* These compiler options take n arguments. */
|
||||
|
||||
#undef WORD_SWITCH_TAKES_ARG
|
||||
#define WORD_SWITCH_TAKES_ARG(STR) \
|
||||
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) ? 1 : \
|
||||
!strcmp (STR, "segalign") ? 1 : \
|
||||
!strcmp (STR, "seg1addr") ? 1 : \
|
||||
!strcmp (STR, "segaddr") ? 2 : \
|
||||
!strcmp (STR, "sectobjectsymbols") ? 2 : \
|
||||
!strcmp (STR, "segprot") ? 3 : \
|
||||
!strcmp (STR, "sectcreate") ? 3 : \
|
||||
!strcmp (STR, "sectalign") ? 3 : \
|
||||
!strcmp (STR, "segcreate") ? 3 : \
|
||||
!strcmp (STR, "sectorder") ? 3 : \
|
||||
!strcmp (STR, "siff-mask") ? 1 : \
|
||||
!strcmp (STR, "siff-filter") ? 1 : \
|
||||
!strcmp (STR, "siff-warning") ? 1 : \
|
||||
!strcmp (STR, "arch") ? 1 : \
|
||||
!strcmp (STR, "pagezero_size") ? 1 : \
|
||||
0)
|
||||
|
||||
#undef WORD_SWITCH
|
||||
#define WORD_SWITCH(STR) \
|
||||
(WORD_SWITCH_TAKES_ARG (STR) \
|
||||
|| !strcmp (STR, "bsd") \
|
||||
|| !strcmp (STR, "object") \
|
||||
|| !strcmp (STR, "ObjC") \
|
||||
|| !strcmp (STR, "all_load"))
|
||||
|
||||
/* Machine dependent ccp options. */
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%{!traditional: -D__STDC__} \
|
||||
%{posixstrict:-D_POSIX_SOURCE} \
|
||||
%{!posixstrict:%{bsd:-D__STRICT_BSD__} \
|
||||
%{posix:-D_POSIX_SOURCE} \
|
||||
%{!ansi:-D_NEXT_SOURCE}} \
|
||||
%{MD:-MD %M} %{MMD:-MMD %M}"
|
||||
|
||||
/* Machine dependent ld options. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{Z} %{M} \
|
||||
%{execute*} %{preload*} %{fvmlib*} \
|
||||
%{segalign*} %{seg1addr*} %{segaddr*} %{segprot*} \
|
||||
%{pagezero_size*} \
|
||||
%{seglinkedit*} %{noseglinkedit*} \
|
||||
%{sectcreate*} %{sectalign*} %{sectobjectsymbols}\
|
||||
%{segcreate*} %{Mach*} %{whyload} %{w} \
|
||||
%{sectorder*} %{whatsloaded} %{ObjC} %{all_load} %{object}"
|
||||
|
||||
/* Machine dependent libraries. */
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "%{!posix*:-lsys_s} %{posix*:-lposix}"
|
||||
|
||||
/* We specify crt0.o as -lcrt0.o so that ld will search the library path. */
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!posix*:%{pg:-lgcrt0.o}%{!pg: \
|
||||
%{p:%e-p profiling is no longer supported. Use -pg instead} \
|
||||
%{!p:-lcrt0.o}}}\
|
||||
%{posix*:%{pg:-lgposixcrt0.o}%{!pg: \
|
||||
%{p:%e-p profiling is no longer supported. Use -pg instead} \
|
||||
%{!p:-lposixcrt0.o}}} \
|
||||
-lcrtbegin.o"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC \
|
||||
"-lcrtend.o"
|
||||
|
||||
/* Allow #sscs (but don't do anything). */
|
||||
|
||||
#define SCCS_DIRECTIVE
|
||||
|
||||
/* We use Dbx symbol format. */
|
||||
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
#undef XCOFF_DEBUGGING_INFO
|
||||
#define DBX_DEBUGGING_INFO
|
||||
|
||||
/* This saves a fair amount of space. */
|
||||
|
||||
#undef DBX_CONTIN_LENGTH
|
||||
#define DBX_CONTIN_LENGTH 0
|
||||
|
||||
/* These screw up NeXT's gdb at the moment, so don't use them. */
|
||||
|
||||
#undef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY
|
||||
#define DBX_OUTPUT_MAIN_SOURCE_DIRECTORY(FILE, FILENAME)
|
||||
|
||||
/* These come from bsd386.h, but are specific to sequent, so make sure
|
||||
they don't bite us. */
|
||||
|
||||
#undef DBX_NO_XREFS
|
||||
#undef DBX_CONTIN_LENGTH
|
||||
|
||||
/* gdb needs a null N_SO at the end of each file for scattered loading. */
|
||||
|
||||
#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
|
||||
#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
|
||||
fprintf (FILE, \
|
||||
"\t.text\n\t.stabs \"%s\",%d,0,0,Letext\nLetext:\n", \
|
||||
"" , N_SO)
|
||||
|
||||
/* Define our object format type for crtstuff.c */
|
||||
#define OBJECT_FORMAT_MACHO
|
||||
|
||||
#undef INIT_SECTION_ASM_OP
|
||||
#define INIT_SECTION_ASM_OP
|
||||
#undef INVOKE__main
|
||||
|
||||
#define TARGET_ASM_CONSTRUCTOR nextstep_asm_out_constructor
|
||||
#define TARGET_ASM_DESTRUCTOR nextstep_asm_out_destructor
|
||||
|
||||
#define TARGET_ASM_EXCEPTION_SECTION nextstep_exception_section
|
||||
|
||||
#define TARGET_ASM_EH_FRAME_SECTION nextstep_eh_frame_section
|
||||
|
||||
/* Don't output a .file directive. That is only used by the assembler for
|
||||
error reporting. */
|
||||
#undef ASM_FILE_START
|
||||
#define ASM_FILE_START(FILE)
|
||||
|
||||
#undef ASM_FILE_END
|
||||
#define ASM_FILE_END(FILE) \
|
||||
do { \
|
||||
if (strcmp (lang_hooks.name, "GNU C++") == 0) \
|
||||
{ \
|
||||
constructor_section (); \
|
||||
destructor_section (); \
|
||||
ASM_OUTPUT_ALIGN (FILE, 1); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* How to parse #pragma's */
|
||||
|
||||
#undef HANDLE_PRAGMA
|
||||
#define HANDLE_PRAGMA(GETC, UNGETC, NAME) handle_pragma (GETC, UNGETC, NAME)
|
||||
|
||||
/* Give methods pretty symbol names on NeXT. */
|
||||
|
||||
#undef OBJC_GEN_METHOD_LABEL
|
||||
#define OBJC_GEN_METHOD_LABEL(BUF,IS_INST,CLASS_NAME,CAT_NAME,SEL_NAME,NUM) \
|
||||
do { if (CAT_NAME) \
|
||||
sprintf (BUF, "%c[%s(%s) %s]", (IS_INST) ? '-' : '+', \
|
||||
(CLASS_NAME), (CAT_NAME), (SEL_NAME)); \
|
||||
else \
|
||||
sprintf (BUF, "%c[%s %s]", (IS_INST) ? '-' : '+', \
|
||||
(CLASS_NAME), (SEL_NAME)); \
|
||||
} while (0)
|
||||
|
||||
/* The prefix to add to user-visible assembler symbols. */
|
||||
|
||||
#undef USER_LABEL_PREFIX
|
||||
#define USER_LABEL_PREFIX "_"
|
||||
|
||||
/* Wrap new method names in quotes so the assembler doesn't gag.
|
||||
Make Objective-C internal symbols local. */
|
||||
|
||||
#undef ASM_OUTPUT_LABELREF
|
||||
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
|
||||
do { if (NAME[0] == '+' || NAME[0] == '-') fprintf (FILE, "\"%s\"", NAME); \
|
||||
else if (!strncmp (NAME, "_OBJC_", 6)) fprintf (FILE, "L%s", NAME); \
|
||||
else if (!strncmp (NAME, ".objc_class_name_", 17)) \
|
||||
fprintf (FILE, "%s", NAME); \
|
||||
else asm_fprintf (FILE, "%U%s", NAME); } while (0)
|
||||
|
||||
#undef ALIGN_ASM_OP
|
||||
#define ALIGN_ASM_OP "\t.align\t"
|
||||
|
||||
#undef ASM_OUTPUT_ALIGN
|
||||
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
||||
if ((LOG) != 0) \
|
||||
fprintf (FILE, "%s%d\n", ALIGN_ASM_OP, (LOG))
|
||||
|
||||
/* Ensure correct alignment of bss data. */
|
||||
|
||||
#undef ASM_OUTPUT_ALIGNED_LOCAL
|
||||
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
|
||||
( fputs (".lcomm ", (FILE)), \
|
||||
assemble_name ((FILE), (NAME)), \
|
||||
fprintf ((FILE), ",%u,%u\n", (SIZE), floor_log2 ((ALIGN) / BITS_PER_UNIT)))
|
||||
|
||||
/* Output #ident as a .ident. */
|
||||
|
||||
#undef ASM_OUTPUT_IDENT
|
||||
#define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME);
|
||||
|
||||
/* The maximum alignment which the object file format can support.
|
||||
For NeXT's Mach-O format, this is 2^15. */
|
||||
|
||||
#undef MAX_OFILE_ALIGNMENT
|
||||
#define MAX_OFILE_ALIGNMENT 0x8000
|
||||
|
||||
/* Create new Mach-O sections. */
|
||||
|
||||
#undef SECTION_FUNCTION
|
||||
#define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, WAS_TEXT, OBJC) \
|
||||
extern void FUNCTION PARAMS ((void)); \
|
||||
void \
|
||||
FUNCTION () \
|
||||
{ \
|
||||
extern int flag_no_mach_text_sections; \
|
||||
\
|
||||
if (WAS_TEXT && flag_no_mach_text_sections) \
|
||||
text_section (); \
|
||||
else if (in_section != SECTION) \
|
||||
{ \
|
||||
if (OBJC) \
|
||||
objc_section_init (); \
|
||||
fprintf (asm_out_file, "%s\n", DIRECTIVE); \
|
||||
in_section = SECTION; \
|
||||
} \
|
||||
} \
|
||||
|
||||
#undef EXTRA_SECTIONS
|
||||
#define EXTRA_SECTIONS \
|
||||
in_const, in_cstring, in_literal4, in_literal8, \
|
||||
in_constructor, in_destructor, \
|
||||
in_nextstep_exception, in_nextstep_eh_frame, \
|
||||
in_objc_class, in_objc_meta_class, in_objc_category, \
|
||||
in_objc_class_vars, in_objc_instance_vars, \
|
||||
in_objc_cls_meth, in_objc_inst_meth, \
|
||||
in_objc_cat_cls_meth, in_objc_cat_inst_meth, \
|
||||
in_objc_selector_refs, \
|
||||
in_objc_symbols, in_objc_module_info, \
|
||||
in_objc_protocol, in_objc_string_object, \
|
||||
in_objc_class_names, in_objc_meth_var_names, \
|
||||
in_objc_meth_var_types, in_objc_cls_refs
|
||||
|
||||
#undef EXTRA_SECTION_FUNCTIONS
|
||||
#define EXTRA_SECTION_FUNCTIONS \
|
||||
extern void objc_section_init PARAMS ((void)); \
|
||||
SECTION_FUNCTION (const_section, \
|
||||
in_const, \
|
||||
".const", 1, 0) \
|
||||
SECTION_FUNCTION (cstring_section, \
|
||||
in_cstring, \
|
||||
".cstring", 1, 0) \
|
||||
SECTION_FUNCTION (literal4_section, \
|
||||
in_literal4, \
|
||||
".literal4", 1, 0) \
|
||||
SECTION_FUNCTION (literal8_section, \
|
||||
in_literal8, \
|
||||
".literal8", 1, 0) \
|
||||
SECTION_FUNCTION (constructor_section, \
|
||||
in_constructor, \
|
||||
".constructor", 0, 0) \
|
||||
SECTION_FUNCTION (destructor_section, \
|
||||
in_destructor, \
|
||||
".destructor", 0, 0) \
|
||||
SECTION_FUNCTION (nextstep_exception_section, \
|
||||
in_nextstep_exception, \
|
||||
".section __TEXT,__gcc_except_tab,regular", 0, 0) \
|
||||
SECTION_FUNCTION (nextstep_eh_frame_section, \
|
||||
in_nextstep_eh_frame, \
|
||||
".section __TEXT,__eh_frame,regular", 0, 0) \
|
||||
SECTION_FUNCTION (objc_class_section, \
|
||||
in_objc_class, \
|
||||
".objc_class", 0, 1) \
|
||||
SECTION_FUNCTION (objc_meta_class_section, \
|
||||
in_objc_meta_class, \
|
||||
".objc_meta_class", 0, 1) \
|
||||
SECTION_FUNCTION (objc_category_section, \
|
||||
in_objc_category, \
|
||||
".objc_category", 0, 1) \
|
||||
SECTION_FUNCTION (objc_class_vars_section, \
|
||||
in_objc_class_vars, \
|
||||
".objc_class_vars", 0, 1) \
|
||||
SECTION_FUNCTION (objc_instance_vars_section, \
|
||||
in_objc_instance_vars, \
|
||||
".objc_instance_vars", 0, 1) \
|
||||
SECTION_FUNCTION (objc_cls_meth_section, \
|
||||
in_objc_cls_meth, \
|
||||
".objc_cls_meth", 0, 1) \
|
||||
SECTION_FUNCTION (objc_inst_meth_section, \
|
||||
in_objc_inst_meth, \
|
||||
".objc_inst_meth", 0, 1) \
|
||||
SECTION_FUNCTION (objc_cat_cls_meth_section, \
|
||||
in_objc_cat_cls_meth, \
|
||||
".objc_cat_cls_meth", 0, 1) \
|
||||
SECTION_FUNCTION (objc_cat_inst_meth_section, \
|
||||
in_objc_cat_inst_meth, \
|
||||
".objc_cat_inst_meth", 0, 1) \
|
||||
SECTION_FUNCTION (objc_selector_refs_section, \
|
||||
in_objc_selector_refs, \
|
||||
".objc_message_refs", 0, 1) \
|
||||
SECTION_FUNCTION (objc_symbols_section, \
|
||||
in_objc_symbols, \
|
||||
".objc_symbols", 0, 1) \
|
||||
SECTION_FUNCTION (objc_module_info_section, \
|
||||
in_objc_module_info, \
|
||||
".objc_module_info", 0, 1) \
|
||||
SECTION_FUNCTION (objc_protocol_section, \
|
||||
in_objc_protocol, \
|
||||
".objc_protocol", 0, 1) \
|
||||
SECTION_FUNCTION (objc_string_object_section, \
|
||||
in_objc_string_object, \
|
||||
".objc_string_object", 0, 1) \
|
||||
SECTION_FUNCTION (objc_class_names_section, \
|
||||
in_objc_class_names, \
|
||||
".objc_class_names", 0, 1) \
|
||||
SECTION_FUNCTION (objc_meth_var_names_section, \
|
||||
in_objc_meth_var_names, \
|
||||
".objc_meth_var_names", 0, 1) \
|
||||
SECTION_FUNCTION (objc_meth_var_types_section, \
|
||||
in_objc_meth_var_types, \
|
||||
".objc_meth_var_types", 0, 1) \
|
||||
SECTION_FUNCTION (objc_cls_refs_section, \
|
||||
in_objc_cls_refs, \
|
||||
".objc_cls_refs", 0, 1) \
|
||||
\
|
||||
void \
|
||||
objc_section_init () \
|
||||
{ \
|
||||
static int been_here = 0; \
|
||||
\
|
||||
if (been_here == 0) \
|
||||
{ \
|
||||
been_here = 1; \
|
||||
objc_class_section (); \
|
||||
objc_meta_class_section (); \
|
||||
objc_cat_cls_meth_section (); \
|
||||
objc_cat_inst_meth_section (); \
|
||||
objc_cls_meth_section (); \
|
||||
objc_inst_meth_section (); \
|
||||
objc_selector_refs_section (); \
|
||||
objc_symbols_section (); \
|
||||
objc_category_section (); \
|
||||
objc_protocol_section (); \
|
||||
objc_class_vars_section (); \
|
||||
objc_instance_vars_section (); \
|
||||
objc_module_info_section (); \
|
||||
objc_string_object_section (); \
|
||||
objc_class_names_section (); \
|
||||
objc_meth_var_names_section (); \
|
||||
objc_meth_var_types_section (); \
|
||||
objc_cls_refs_section (); \
|
||||
} \
|
||||
}
|
||||
|
||||
#undef READONLY_DATA_SECTION
|
||||
#define READONLY_DATA_SECTION const_section
|
||||
|
||||
#undef SELECT_SECTION
|
||||
#define SELECT_SECTION(exp,reloc,align) \
|
||||
do \
|
||||
{ \
|
||||
if (TREE_CODE (exp) == STRING_CST) \
|
||||
{ \
|
||||
if (flag_writable_strings) \
|
||||
data_section (); \
|
||||
else if (TREE_STRING_LENGTH (exp) != \
|
||||
strlen (TREE_STRING_POINTER (exp)) + 1) \
|
||||
readonly_data_section (); \
|
||||
else \
|
||||
cstring_section (); \
|
||||
} \
|
||||
else if (TREE_CODE (exp) == INTEGER_CST \
|
||||
|| TREE_CODE (exp) == REAL_CST) \
|
||||
{ \
|
||||
tree size = TYPE_SIZE (TREE_TYPE (exp)); \
|
||||
\
|
||||
if (TREE_CODE (size) == INTEGER_CST && \
|
||||
TREE_INT_CST_LOW (size) == 4 && \
|
||||
TREE_INT_CST_HIGH (size) == 0) \
|
||||
literal4_section (); \
|
||||
else if (TREE_CODE (size) == INTEGER_CST && \
|
||||
TREE_INT_CST_LOW (size) == 8 && \
|
||||
TREE_INT_CST_HIGH (size) == 0) \
|
||||
literal8_section (); \
|
||||
else \
|
||||
readonly_data_section (); \
|
||||
} \
|
||||
else if (TREE_CODE (exp) == CONSTRUCTOR \
|
||||
&& TREE_TYPE (exp) \
|
||||
&& TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE \
|
||||
&& TYPE_NAME (TREE_TYPE (exp)) \
|
||||
&& TREE_CODE (TYPE_NAME (TREE_TYPE (exp))) == IDENTIFIER_NODE \
|
||||
&& IDENTIFIER_POINTER (TYPE_NAME (TREE_TYPE (exp)))) \
|
||||
{ \
|
||||
if (!strcmp (IDENTIFIER_POINTER (TYPE_NAME (TREE_TYPE (exp))), \
|
||||
"NXConstantString")) \
|
||||
objc_string_object_section (); \
|
||||
else if ((TREE_READONLY (exp) || TREE_CONSTANT (exp)) \
|
||||
&& !TREE_SIDE_EFFECTS (exp)) \
|
||||
readonly_data_section (); \
|
||||
else \
|
||||
data_section (); \
|
||||
} \
|
||||
else if (TREE_CODE (exp) == VAR_DECL && \
|
||||
DECL_NAME (exp) && \
|
||||
TREE_CODE (DECL_NAME (exp)) == IDENTIFIER_NODE && \
|
||||
IDENTIFIER_POINTER (DECL_NAME (exp)) && \
|
||||
!strncmp (IDENTIFIER_POINTER (DECL_NAME (exp)), "_OBJC_", 6)) \
|
||||
{ \
|
||||
const char *name = IDENTIFIER_POINTER (DECL_NAME (exp)); \
|
||||
\
|
||||
if (!strncmp (name, "_OBJC_CLASS_METHODS_", 20)) \
|
||||
objc_cls_meth_section (); \
|
||||
else if (!strncmp (name, "_OBJC_INSTANCE_METHODS_", 23)) \
|
||||
objc_inst_meth_section (); \
|
||||
else if (!strncmp (name, "_OBJC_CATEGORY_CLASS_METHODS_", 20)) \
|
||||
objc_cat_cls_meth_section (); \
|
||||
else if (!strncmp (name, "_OBJC_CATEGORY_INSTANCE_METHODS_", 23)) \
|
||||
objc_cat_inst_meth_section (); \
|
||||
else if (!strncmp (name, "_OBJC_CLASS_VARIABLES_", 22)) \
|
||||
objc_class_vars_section (); \
|
||||
else if (!strncmp (name, "_OBJC_INSTANCE_VARIABLES_", 25)) \
|
||||
objc_instance_vars_section (); \
|
||||
else if (!strncmp (name, "_OBJC_CLASS_PROTOCOLS_", 22)) \
|
||||
objc_cat_cls_meth_section (); \
|
||||
else if (!strncmp (name, "_OBJC_CLASS_NAME_", 17)) \
|
||||
objc_class_names_section (); \
|
||||
else if (!strncmp (name, "_OBJC_METH_VAR_NAME_", 20)) \
|
||||
objc_meth_var_names_section (); \
|
||||
else if (!strncmp (name, "_OBJC_METH_VAR_TYPE_", 20)) \
|
||||
objc_meth_var_types_section (); \
|
||||
else if (!strncmp (name, "_OBJC_CLASS_REFERENCES", 22)) \
|
||||
objc_cls_refs_section (); \
|
||||
else if (!strncmp (name, "_OBJC_CLASS_", 12)) \
|
||||
objc_class_section (); \
|
||||
else if (!strncmp (name, "_OBJC_METACLASS_", 16)) \
|
||||
objc_meta_class_section (); \
|
||||
else if (!strncmp (name, "_OBJC_CATEGORY_", 15)) \
|
||||
objc_category_section (); \
|
||||
else if (!strncmp (name, "_OBJC_SELECTOR_REFERENCES", 25)) \
|
||||
objc_selector_refs_section (); \
|
||||
else if (!strncmp (name, "_OBJC_SYMBOLS", 13)) \
|
||||
objc_symbols_section (); \
|
||||
else if (!strncmp (name, "_OBJC_MODULES", 13)) \
|
||||
objc_module_info_section (); \
|
||||
else if (!strncmp (name, "_OBJC_PROTOCOL_INSTANCE_METHODS_", 32)) \
|
||||
objc_cat_inst_meth_section (); \
|
||||
else if (!strncmp (name, "_OBJC_PROTOCOL_CLASS_METHODS_", 29)) \
|
||||
objc_cat_cls_meth_section (); \
|
||||
else if (!strncmp (name, "_OBJC_PROTOCOL_REFS_", 20)) \
|
||||
objc_cat_cls_meth_section (); \
|
||||
else if (!strncmp (name, "_OBJC_PROTOCOL_", 15)) \
|
||||
objc_protocol_section (); \
|
||||
else if ((TREE_READONLY (exp) || TREE_CONSTANT (exp)) \
|
||||
&& !TREE_SIDE_EFFECTS (exp)) \
|
||||
readonly_data_section (); \
|
||||
else \
|
||||
data_section (); \
|
||||
} \
|
||||
else if (TREE_CODE (exp) == VAR_DECL) \
|
||||
{ \
|
||||
if ((flag_pic && reloc) \
|
||||
|| !TREE_READONLY (exp) || TREE_SIDE_EFFECTS (exp) \
|
||||
|| !DECL_INITIAL (exp) \
|
||||
|| (DECL_INITIAL (exp) != error_mark_node \
|
||||
&& !TREE_CONSTANT (DECL_INITIAL (exp)))) \
|
||||
data_section (); \
|
||||
else \
|
||||
readonly_data_section (); \
|
||||
} \
|
||||
else \
|
||||
readonly_data_section (); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#undef SELECT_RTX_SECTION
|
||||
#define SELECT_RTX_SECTION(mode, rtx, align) \
|
||||
do \
|
||||
{ \
|
||||
if (GET_MODE_SIZE(mode) == 8) \
|
||||
literal8_section(); \
|
||||
else if (GET_MODE_SIZE(mode) == 4) \
|
||||
literal4_section(); \
|
||||
else \
|
||||
const_section (); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#ifdef ASM_COMMENT_START
|
||||
# undef ASM_COMMENT_START
|
||||
#endif
|
||||
|
||||
#define ASM_COMMENT_START ";#"
|
@ -1,64 +0,0 @@
|
||||
/* nextstep.h -- operating system specific defines to be used when
|
||||
targeting GCC for NeXTSTEP.
|
||||
Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* changed for NeXTStep 2.1, Ch. Kranz, 2/94, 3/94 */
|
||||
#include "nextstep.h"
|
||||
|
||||
/* set flag_gnu_linker=0, use collect2 for linking */
|
||||
#undef USE_COLLECT2
|
||||
#define USE_COLLECT2
|
||||
|
||||
/* use this until a newer gdb for NeXTStep21 is available */
|
||||
#define DEFAULT_GDB_EXTENSIONS 0
|
||||
|
||||
/* we need the call to __main to start all global destructors and constructors
|
||||
correctly, so undef INIT_SECTION_ASM_OP, (see libgcc2.c line 1965)
|
||||
and define INVOKE_main */
|
||||
#undef INIT_SECTION_ASM_OP
|
||||
#define INVOKE__main
|
||||
|
||||
/* We call the global destructors, constructors from __main */
|
||||
#undef TARGET_ASM_CONSTRUCTOR
|
||||
#undef TARGET_ASM_DESTRUCTOR
|
||||
|
||||
#undef ASM_FILE_END
|
||||
#define ASM_FILE_END(FILE) \
|
||||
do { \
|
||||
if (strcmp (lang_hooks.name, "GNU C++") == 0) \
|
||||
{ \
|
||||
ASM_OUTPUT_ALIGN (FILE, 1); \
|
||||
} \
|
||||
} while (0)
|
||||
/* deleted: destructor_section (); \ */
|
||||
/* deleted: constructor_section (); \ */
|
||||
|
||||
/* Ensure correct alignment of bss data. */
|
||||
/* ASM_OUTPUT_ALIGNED_LOCAL not needed */
|
||||
/* need ASM_OUTPUT_LOCAL instead for old NeXT-as */
|
||||
/* look in varasm.c, line 1062 and 1476 */
|
||||
#undef ASM_OUTPUT_ALIGNED_LOCAL
|
||||
#undef ASM_OUTPUT_LOCAL
|
||||
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
|
||||
( fputs (".lcomm ", (FILE)), \
|
||||
assemble_name ((FILE), (NAME)), \
|
||||
fprintf ((FILE), ",%u\n", (ROUNDED)))
|
||||
|
@ -1,24 +0,0 @@
|
||||
/* Target definitions for GNU compiler for PowerPC defaulting to -msoft-float
|
||||
Copyright (C) 2001
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Red Hat Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef CPP_FLOAT_DEFAULT_SPEC
|
||||
#define CPP_FLOAT_DEFAULT_SPEC "-D_SOFT_FLOAT"
|
@ -1,7 +0,0 @@
|
||||
# The crtbegin and crtend must not depend on a small GOT
|
||||
CRTSTUFF_T_CFLAGS = -O2 -fPIC
|
||||
CRTSTUFF_T_CFLAGS_S = -O2 -fPIC
|
||||
|
||||
# Compile libgcc2.a with pic.
|
||||
TARGET_LIBGCC2_CFLAGS = -fPIC -include $(srcdir)/config/s390/fixdfdi.h
|
||||
|
@ -1,27 +0,0 @@
|
||||
/* Definitions for rtems targeting a SPARC using a.out.
|
||||
Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
|
||||
Contributed by Joel Sherrill (joel@OARcorp.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* Specify predefined symbols in preprocessor. */
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -D__rtems__ \
|
||||
-Asystem=rtems"
|
@ -1,88 +0,0 @@
|
||||
! gcrt1.s for solaris 2.0.
|
||||
|
||||
! Copyright (C) 1992 Free Software Foundation, Inc.
|
||||
! Written By David Vinayak Henkel-Wallace, June 1992
|
||||
!
|
||||
! This file is free software; you can redistribute it and/or modify it
|
||||
! under the terms of the GNU General Public License as published by the
|
||||
! Free Software Foundation; either version 2, or (at your option) any
|
||||
! later version.
|
||||
!
|
||||
! In addition to the permissions in the GNU General Public License, the
|
||||
! Free Software Foundation gives you unlimited permission to link the
|
||||
! compiled version of this file with other programs, and to distribute
|
||||
! those programs without any restriction coming from the use of this
|
||||
! file. (The General Public License restrictions do apply in other
|
||||
! respects; for example, they cover modification of the file, and
|
||||
! distribution when not linked into another program.)
|
||||
!
|
||||
! This file is distributed in the hope that it will be useful, but
|
||||
! WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
! General Public License for more details.
|
||||
!
|
||||
! You should have received a copy of the GNU General Public License
|
||||
! along with this program; see the file COPYING. If not, write to
|
||||
! the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
! Boston, MA 02111-1307, USA.
|
||||
!
|
||||
! As a special exception, if you link this library with files
|
||||
! compiled with GCC to produce an executable, this does not cause
|
||||
! the resulting executable to be covered by the GNU General Public License.
|
||||
! This exception does not however invalidate any other reasons why
|
||||
! the executable file might be covered by the GNU General Public License.
|
||||
!
|
||||
|
||||
! This file takes control of the process from the kernel, as specified
|
||||
! in section 3 of the SVr4 ABI.
|
||||
! This file is the first thing linked into any executable.
|
||||
|
||||
.section ".text"
|
||||
.proc 022
|
||||
.global _start
|
||||
|
||||
_start:
|
||||
mov 0, %fp ! Mark bottom frame pointer
|
||||
ld [%sp + 64], %l0 ! argc
|
||||
add %sp, 68, %l1 ! argv
|
||||
|
||||
! Leave some room for a call. Sun leaves 32 octets (to sit on
|
||||
! a cache line?) so we do too.
|
||||
sub %sp, 32, %sp
|
||||
|
||||
! %g1 may contain a function to be registered w/atexit
|
||||
orcc %g0, %g1, %g0
|
||||
be .nope
|
||||
mov %g1, %o0
|
||||
call atexit
|
||||
nop
|
||||
.nope:
|
||||
! Now make sure constructors and destructors are handled.
|
||||
set _fini, %o0
|
||||
call atexit, 1
|
||||
nop
|
||||
call _init, 0
|
||||
nop
|
||||
|
||||
! We ignore the auxiliary vector; there's no defined way to
|
||||
! access those data anyway. Instead, go straight to main:
|
||||
mov %l0, %o0 ! argc
|
||||
mov %l1, %o1 ! argv
|
||||
set ___Argv, %o3
|
||||
st %o1, [%o3] ! *___Argv
|
||||
! Skip argc words past argv, to env:
|
||||
sll %l0, 2, %o2
|
||||
add %o2, 4, %o2
|
||||
add %l1, %o2, %o2 ! env
|
||||
set _environ, %o3
|
||||
st %o2, [%o3] ! *_environ
|
||||
call main, 4
|
||||
nop
|
||||
call exit, 0
|
||||
nop
|
||||
call _exit, 0
|
||||
nop
|
||||
! We should never get here.
|
||||
|
||||
.type _start,#function
|
||||
.size _start,.-_start
|
@ -1,8 +0,0 @@
|
||||
/* Up through Solaris 2.7, the system linker does not work with DWARF
|
||||
or DWARF2, since it does not have working support for relocations
|
||||
to unaligned data. */
|
||||
|
||||
#undef DWARF_DEBUGGING_INFO
|
||||
#undef DWARF2_DEBUGGING_INFO
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#undef ASM_DEBUG_SPEC
|
@ -1,3 +0,0 @@
|
||||
# Handle cpp installation.
|
||||
INSTALL_CPP=install-cpp
|
||||
UNINSTALL_CPP=uninstall-cpp
|
@ -1,11 +0,0 @@
|
||||
# Configuration fragment for G++.
|
||||
# Most of the real configuration work happens in the main GCC configure.
|
||||
|
||||
# We need to join some lines in the Makefile.in before the sed
|
||||
# process will work properly. The funky little sed script works by
|
||||
# recognizing lines with a trailing '$@ \', adding the next line to
|
||||
# its "pattern space", editing out the backslash and line, then
|
||||
# putting the result out.
|
||||
|
||||
sed -e '/$@ \\/{N;s/$@ \\./$@ /;P;D;}' \Option-d
|
||||
"{srcdir}"Makefile.in >"{o}"hacked_Makefile.in
|
@ -1,112 +0,0 @@
|
||||
# Sed commands to finish translating the G++ Unix makefile into MPW syntax.
|
||||
|
||||
# Remove control-Ls, they upset MPW make.
|
||||
s///g
|
||||
|
||||
# Remove references to always-empty variables used to mark things.
|
||||
/CYGNUS-LOCAL-/s/{CYGNUS-LOCAL-[a-z0-9]*}//g
|
||||
|
||||
# Add a bunch of definitions, mostly empty.
|
||||
/^# Variables that exist for you to override.$/a\
|
||||
\
|
||||
xmake_file = \
|
||||
tmake_file = \
|
||||
build_xm_file = \
|
||||
MALLOC = \
|
||||
MD_DEPS = \
|
||||
REAL_H = \
|
||||
HOST_CC_LD = {CC_LD}\
|
||||
ALL_CCLDFLAGS = \
|
||||
HOST_CCLDFLAGS = \
|
||||
CONFIG_H = \
|
||||
LIBDEPS = \
|
||||
|
||||
# The "target" variable is special to MPW make, avoid it.
|
||||
/{target}/s/{target}/{target_canonical}/g
|
||||
|
||||
# Suppress the suppression of smart makes.
|
||||
/^\.y\.c/d
|
||||
|
||||
# Whack out "..." assignments.
|
||||
/\.\.\./s/^\([a-z_]*= \.\.\.\)/#\1/
|
||||
|
||||
# Previous edits go a little overboard, undo.
|
||||
/^objext = /s/"{o}"//
|
||||
|
||||
# Always link in low-level MPW functions.
|
||||
/^LIBDEPS=/s/$/ ::strerror.c.o ::mpwlib.c.o/
|
||||
/{CLIB}/s/{CLIB}/ ::strerror.c.o ::mpwlib.c.o {CLIB}/
|
||||
|
||||
# Don't get tricky about finding various .o file, point at dir above.
|
||||
/^SUBDIR_OBSTACK/s/`.*`/::obstack.c.o/
|
||||
/^SUBDIR_USE_ALLOCA/s/`.*`/::alloca.c.o/
|
||||
/^SUBDIR_MALLOC/s/`.*`//
|
||||
|
||||
# Point includes at parent directly correctly.
|
||||
/^INCLUDES = /s/:\./::/g
|
||||
/^INCLUDES = /s/"{srcdir}"\.\./"{topsrcdir}"gcc:/g
|
||||
/^INCLUDES = /s,"{srcdir}"/\.\.,"{topsrcdir}"gcc:,g
|
||||
/^INCLUDES = /s,"{srcdir}":config,"{topsrcdir}"gcc:config:,g
|
||||
|
||||
# Add the special MPW include dirs.
|
||||
/^INCLUDES = /s/$/ -i "{topsrcdir}"include:mpw: -i :::extra-include:/
|
||||
|
||||
# A nasty hack to reduce confusion.
|
||||
/true/s/ ; @true$//
|
||||
|
||||
# (should be in common translation?)
|
||||
/{CC_LD} /s/$/ {EXTRALIBS}/
|
||||
|
||||
# Don't use general compiler flags (which may include definitions
|
||||
# and other compiler-only bits) with linking commands.
|
||||
/{CC_LD} /s/ALL_CFLAGS/ALL_CCLDFLAGS/
|
||||
|
||||
# Whack out build rules that are not useful.
|
||||
/^Makefile \\Option-f /,/^$/d
|
||||
/^config.status \\Option-f /,/^$/d
|
||||
# (Note that MPW make is not case sensitive, and so this name
|
||||
# is considered the same as "md_file".)
|
||||
/^{MD_FILE} \\Option-f/,/^$/d
|
||||
|
||||
# Depending on config.status is not useful for us.
|
||||
/config.status/s/ config.status//
|
||||
|
||||
# Repeat of stuff from generic edit.
|
||||
/{s}/s/"{s}""{s}"/"{s}"/g
|
||||
/{s}/s/"{s}""{srcdir}"/"{s}"/g
|
||||
/{s}/s/"{srcdir}""{s}"/"{s}"/g
|
||||
|
||||
# Fix references to C frontend files in main dir.
|
||||
/::c-/s/"{o}"::c-/"{o}":c-/g
|
||||
|
||||
# Fix pathnames to generated files in the objdir.
|
||||
/parse/s/"{s}"parse\.\([chy]\)/"{o}"parse.\1/g
|
||||
/parse/s/^parse\.\([chy]\)/"{o}"parse.\1/
|
||||
/y.tab.c/s/"{s}"y\.tab\.c/"{o}"y.tab.c/g
|
||||
/y.tab.c/s/^y\.tab\.c/"{o}"y.tab.c/
|
||||
/y.tab.h/s/"{s}"y\.tab\.h/"{o}"y.tab.h/g
|
||||
/y.tab.h/s/^y\.tab\.h/"{o}"y.tab.h/
|
||||
|
||||
# Put in the definition of YYEMPTY directly.
|
||||
/grep/s/grep .* >>/Echo '#define YYEMPTY -1' >>/
|
||||
|
||||
# If the dates are wrong, then this tries to run gperf, which we don't
|
||||
# really want.
|
||||
/^"{srcdir}"hash.h/,/hash.h$/d
|
||||
|
||||
# Sed the object file list instead of using cat (meow).
|
||||
/cat/s/`cat /`sed -e 's,:,::,g' -e 's,{objext},.o,g' /
|
||||
|
||||
# Simplify dependencies of generated parser files.
|
||||
/^{PARSE_C}/s/^/#/
|
||||
/^stamp-parse/s/^stamp-parse/{PARSE_C}/
|
||||
|
||||
# Fix the compile line for the generated parser.
|
||||
/{CC} -c/,/echo {PARSE_C}/c\
|
||||
{CC} @DASH_C_FLAG@ {ALL_CFLAGS} {ALL_CPPFLAGS} {INCLUDES} {BIG_SWITCHFLAG} "{o}"parse.c -o "{o}"parse.c.o\
|
||||
|
||||
# Change all Rez commands to use mac-gcc.r.
|
||||
/{REZ}/s/"{s}"[-a-zA-Z{}]*\.r/"{topsrcdir}"gcc:mac-gcc.r/
|
||||
|
||||
# Remove pathname junk from the container name.
|
||||
/{REZ}/s/'"'::cc1plus'"'/'"'cc1plus'"'/
|
File diff suppressed because it is too large
Load Diff
@ -1,331 +0,0 @@
|
||||
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||
@c 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
@c This is part of the GCC manual.
|
||||
@c For copying conditions, see the file gcc.texi.
|
||||
|
||||
@node VMS
|
||||
@chapter Using GCC on VMS
|
||||
|
||||
@c prevent bad page break with this line
|
||||
Here is how to use GCC on VMS@.
|
||||
|
||||
@menu
|
||||
* Include Files and VMS:: Where the preprocessor looks for the include files.
|
||||
* Global Declarations:: How to do globaldef, globalref and globalvalue with
|
||||
GCC.
|
||||
* VMS Misc:: Misc information.
|
||||
@end menu
|
||||
|
||||
@node Include Files and VMS
|
||||
@section Include Files and VMS
|
||||
|
||||
@cindex include files and VMS
|
||||
@cindex VMS and include files
|
||||
@cindex header files and VMS
|
||||
Due to the differences between the filesystems of Unix and VMS, GCC
|
||||
attempts to translate file names in @samp{#include} into names that VMS
|
||||
will understand. The basic strategy is to prepend a prefix to the
|
||||
specification of the include file, convert the whole filename to a VMS
|
||||
filename, and then try to open the file. GCC tries various prefixes
|
||||
one by one until one of them succeeds:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
The first prefix is the @samp{GNU_CC_INCLUDE:} logical name: this is
|
||||
where GNU C header files are traditionally stored. If you wish to store
|
||||
header files in non-standard locations, then you can assign the logical
|
||||
@samp{GNU_CC_INCLUDE} to be a search list, where each element of the
|
||||
list is suitable for use with a rooted logical.
|
||||
|
||||
@item
|
||||
The next prefix tried is @samp{SYS$SYSROOT:[SYSLIB.]}. This is where
|
||||
VAX-C header files are traditionally stored.
|
||||
|
||||
@item
|
||||
If the include file specification by itself is a valid VMS filename, the
|
||||
preprocessor then uses this name with no prefix in an attempt to open
|
||||
the include file.
|
||||
|
||||
@item
|
||||
If the file specification is not a valid VMS filename (i.e.@: does not
|
||||
contain a device or a directory specifier, and contains a @samp{/}
|
||||
character), the preprocessor tries to convert it from Unix syntax to
|
||||
VMS syntax.
|
||||
|
||||
Conversion works like this: the first directory name becomes a device,
|
||||
and the rest of the directories are converted into VMS-format directory
|
||||
names. For example, the name @file{X11/foobar.h} is
|
||||
translated to @file{X11:[000000]foobar.h} or @file{X11:foobar.h},
|
||||
whichever one can be opened. This strategy allows you to assign a
|
||||
logical name to point to the actual location of the header files.
|
||||
|
||||
@item
|
||||
If none of these strategies succeeds, the @samp{#include} fails.
|
||||
@end enumerate
|
||||
|
||||
Include directives of the form:
|
||||
|
||||
@example
|
||||
#include foobar
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
are a common source of incompatibility between VAX-C and GCC@. VAX-C
|
||||
treats this much like a standard @code{#include <foobar.h>} directive.
|
||||
That is incompatible with the ISO C behavior implemented by GCC: to
|
||||
expand the name @code{foobar} as a macro. Macro expansion should
|
||||
eventually yield one of the two standard formats for @code{#include}:
|
||||
|
||||
@example
|
||||
#include "@var{file}"
|
||||
#include <@var{file}>
|
||||
@end example
|
||||
|
||||
If you have this problem, the best solution is to modify the source to
|
||||
convert the @code{#include} directives to one of the two standard forms.
|
||||
That will work with either compiler. If you want a quick and dirty fix,
|
||||
define the file names as macros with the proper expansion, like this:
|
||||
|
||||
@example
|
||||
#define stdio <stdio.h>
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
This will work, as long as the name doesn't conflict with anything else
|
||||
in the program.
|
||||
|
||||
Another source of incompatibility is that VAX-C assumes that:
|
||||
|
||||
@example
|
||||
#include "foobar"
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
is actually asking for the file @file{foobar.h}. GCC does not
|
||||
make this assumption, and instead takes what you ask for literally;
|
||||
it tries to read the file @file{foobar}. The best way to avoid this
|
||||
problem is to always specify the desired file extension in your include
|
||||
directives.
|
||||
|
||||
GCC for VMS is distributed with a set of include files that is
|
||||
sufficient to compile most general purpose programs. Even though the
|
||||
GCC distribution does not contain header files to define constants
|
||||
and structures for some VMS system-specific functions, there is no
|
||||
reason why you cannot use GCC with any of these functions. You first
|
||||
may have to generate or create header files, either by using the public
|
||||
domain utility @code{UNSDL} (which can be found on a DECUS tape), or by
|
||||
extracting the relevant modules from one of the system macro libraries,
|
||||
and using an editor to construct a C header file.
|
||||
|
||||
A @code{#include} file name cannot contain a DECNET node name. The
|
||||
preprocessor reports an I/O error if you attempt to use a node name,
|
||||
whether explicitly, or implicitly via a logical name.
|
||||
|
||||
@node Global Declarations
|
||||
@section Global Declarations and VMS
|
||||
|
||||
@findex GLOBALREF
|
||||
@findex GLOBALDEF
|
||||
@findex GLOBALVALUEDEF
|
||||
@findex GLOBALVALUEREF
|
||||
GCC does not provide the @code{globalref}, @code{globaldef} and
|
||||
@code{globalvalue} keywords of VAX-C@. You can get the same effect with
|
||||
an obscure feature of GAS, the GNU assembler. (This requires GAS
|
||||
version 1.39 or later.) The following macros allow you to use this
|
||||
feature in a fairly natural way:
|
||||
|
||||
@smallexample
|
||||
#ifdef __GNUC__
|
||||
#define GLOBALREF(TYPE,NAME) \
|
||||
TYPE NAME \
|
||||
asm ("_$$PsectAttributes_GLOBALSYMBOL$$" #NAME)
|
||||
#define GLOBALDEF(TYPE,NAME,VALUE) \
|
||||
TYPE NAME \
|
||||
asm ("_$$PsectAttributes_GLOBALSYMBOL$$" #NAME) \
|
||||
= VALUE
|
||||
#define GLOBALVALUEREF(TYPE,NAME) \
|
||||
const TYPE NAME[1] \
|
||||
asm ("_$$PsectAttributes_GLOBALVALUE$$" #NAME)
|
||||
#define GLOBALVALUEDEF(TYPE,NAME,VALUE) \
|
||||
const TYPE NAME[1] \
|
||||
asm ("_$$PsectAttributes_GLOBALVALUE$$" #NAME) \
|
||||
= @{VALUE@}
|
||||
#else
|
||||
#define GLOBALREF(TYPE,NAME) \
|
||||
globalref TYPE NAME
|
||||
#define GLOBALDEF(TYPE,NAME,VALUE) \
|
||||
globaldef TYPE NAME = VALUE
|
||||
#define GLOBALVALUEDEF(TYPE,NAME,VALUE) \
|
||||
globalvalue TYPE NAME = VALUE
|
||||
#define GLOBALVALUEREF(TYPE,NAME) \
|
||||
globalvalue TYPE NAME
|
||||
#endif
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
(The @code{_$$PsectAttributes_GLOBALSYMBOL} prefix at the start of the
|
||||
name is removed by the assembler, after it has modified the attributes
|
||||
of the symbol). These macros are provided in the VMS binaries
|
||||
distribution in a header file @file{GNU_HACKS.H}. An example of the
|
||||
usage is:
|
||||
|
||||
@example
|
||||
GLOBALREF (int, ijk);
|
||||
GLOBALDEF (int, jkl, 0);
|
||||
@end example
|
||||
|
||||
The macros @code{GLOBALREF} and @code{GLOBALDEF} cannot be used
|
||||
straightforwardly for arrays, since there is no way to insert the array
|
||||
dimension into the declaration at the right place. However, you can
|
||||
declare an array with these macros if you first define a typedef for the
|
||||
array type, like this:
|
||||
|
||||
@example
|
||||
typedef int intvector[10];
|
||||
GLOBALREF (intvector, foo);
|
||||
@end example
|
||||
|
||||
Array and structure initializers will also break the macros; you can
|
||||
define the initializer to be a macro of its own, or you can expand the
|
||||
@code{GLOBALDEF} macro by hand. You may find a case where you wish to
|
||||
use the @code{GLOBALDEF} macro with a large array, but you are not
|
||||
interested in explicitly initializing each element of the array. In
|
||||
such cases you can use an initializer like: @code{@{0,@}}, which will
|
||||
initialize the entire array to @code{0}.
|
||||
|
||||
A shortcoming of this implementation is that a variable declared with
|
||||
@code{GLOBALVALUEREF} or @code{GLOBALVALUEDEF} is always an array. For
|
||||
example, the declaration:
|
||||
|
||||
@example
|
||||
GLOBALVALUEREF(int, ijk);
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
declares the variable @code{ijk} as an array of type @code{int [1]}.
|
||||
This is done because a globalvalue is actually a constant; its ``value''
|
||||
is what the linker would normally consider an address. That is not how
|
||||
an integer value works in C, but it is how an array works. So treating
|
||||
the symbol as an array name gives consistent results---with the
|
||||
exception that the value seems to have the wrong type. @strong{Don't
|
||||
try to access an element of the array.} It doesn't have any elements.
|
||||
The array ``address'' may not be the address of actual storage.
|
||||
|
||||
The fact that the symbol is an array may lead to warnings where the
|
||||
variable is used. Insert type casts to avoid the warnings. Here is an
|
||||
example; it takes advantage of the ISO C feature allowing macros that
|
||||
expand to use the same name as the macro itself.
|
||||
|
||||
@example
|
||||
GLOBALVALUEREF (int, ss$_normal);
|
||||
GLOBALVALUEDEF (int, xyzzy,123);
|
||||
#ifdef __GNUC__
|
||||
#define ss$_normal ((int) ss$_normal)
|
||||
#define xyzzy ((int) xyzzy)
|
||||
#endif
|
||||
@end example
|
||||
|
||||
Don't use @code{globaldef} or @code{globalref} with a variable whose
|
||||
type is an enumeration type; this is not implemented. Instead, make the
|
||||
variable an integer, and use a @code{globalvaluedef} for each of the
|
||||
enumeration values. An example of this would be:
|
||||
|
||||
@example
|
||||
#ifdef __GNUC__
|
||||
GLOBALDEF (int, color, 0);
|
||||
GLOBALVALUEDEF (int, RED, 0);
|
||||
GLOBALVALUEDEF (int, BLUE, 1);
|
||||
GLOBALVALUEDEF (int, GREEN, 3);
|
||||
#else
|
||||
enum globaldef color @{RED, BLUE, GREEN = 3@};
|
||||
#endif
|
||||
@end example
|
||||
|
||||
@node VMS Misc
|
||||
@section Other VMS Issues
|
||||
|
||||
@cindex exit status and VMS
|
||||
@cindex return value of @code{main}
|
||||
@cindex @code{main} and the exit status
|
||||
GCC automatically arranges for @code{main} to return 1 by default if
|
||||
you fail to specify an explicit return value. This will be interpreted
|
||||
by VMS as a status code indicating a normal successful completion.
|
||||
Version 1 of GCC did not provide this default.
|
||||
|
||||
GCC on VMS works only with the GNU assembler, GAS@. You need version
|
||||
1.37 or later of GAS in order to produce value debugging information for
|
||||
the VMS debugger. Use the ordinary VMS linker with the object files
|
||||
produced by GAS@.
|
||||
|
||||
@cindex shared VMS run time system
|
||||
@cindex @file{VAXCRTL}
|
||||
Under previous versions of GCC, the generated code would occasionally
|
||||
give strange results when linked to the sharable @file{VAXCRTL} library.
|
||||
Now this should work.
|
||||
|
||||
A caveat for use of @code{const} global variables: the @code{const}
|
||||
modifier must be specified in every external declaration of the variable
|
||||
in all of the source files that use that variable. Otherwise the linker
|
||||
will issue warnings about conflicting attributes for the variable. Your
|
||||
program will still work despite the warnings, but the variable will be
|
||||
placed in writable storage.
|
||||
|
||||
@cindex name augmentation
|
||||
@cindex case sensitivity and VMS
|
||||
@cindex VMS and case sensitivity
|
||||
Although the VMS linker does distinguish between upper and lower case
|
||||
letters in global symbols, most VMS compilers convert all such symbols
|
||||
into upper case and most run-time library routines also have upper case
|
||||
names. To be able to reliably call such routines, GCC (by means of
|
||||
the assembler GAS) converts global symbols into upper case like other
|
||||
VMS compilers. However, since the usual practice in C is to distinguish
|
||||
case, GCC (via GAS) tries to preserve usual C behavior by augmenting
|
||||
each name that is not all lower case. This means truncating the name
|
||||
to at most 23 characters and then adding more characters at the end
|
||||
which encode the case pattern of those 23. Names which contain at
|
||||
least one dollar sign are an exception; they are converted directly into
|
||||
upper case without augmentation.
|
||||
|
||||
Name augmentation yields bad results for programs that use precompiled
|
||||
libraries (such as Xlib) which were generated by another compiler. You
|
||||
can use the compiler option @samp{/NOCASE_HACK} to inhibit augmentation;
|
||||
it makes external C functions and variables case-independent as is usual
|
||||
on VMS@. Alternatively, you could write all references to the functions
|
||||
and variables in such libraries using lower case; this will work on VMS,
|
||||
but is not portable to other systems. The compiler option @samp{/NAMES}
|
||||
also provides control over global name handling.
|
||||
|
||||
Function and variable names are handled somewhat differently with G++.
|
||||
The GNU C++ compiler performs @dfn{name mangling} on function
|
||||
names, which means that it adds information to the function name to
|
||||
describe the data types of the arguments that the function takes. One
|
||||
result of this is that the name of a function can become very long.
|
||||
Since the VMS linker only recognizes the first 31 characters in a name,
|
||||
special action is taken to ensure that each function and variable has a
|
||||
unique name that can be represented in 31 characters.
|
||||
|
||||
If the name (plus a name augmentation, if required) is less than 32
|
||||
characters in length, then no special action is performed. If the name
|
||||
is longer than 31 characters, the assembler (GAS) will generate a
|
||||
hash string based upon the function name, truncate the function name to
|
||||
23 characters, and append the hash string to the truncated name. If the
|
||||
@samp{/VERBOSE} compiler option is used, the assembler will print both
|
||||
the full and truncated names of each symbol that is truncated.
|
||||
|
||||
The @samp{/NOCASE_HACK} compiler option should not be used when you are
|
||||
compiling programs that use libg++. libg++ has several instances of
|
||||
objects (i.e. @code{Filebuf} and @code{filebuf}) which become
|
||||
indistinguishable in a case-insensitive environment. This leads to
|
||||
cases where you need to inhibit augmentation selectively (if you were
|
||||
using libg++ and Xlib in the same program, for example). There is no
|
||||
special feature for doing this, but you can get the result by defining a
|
||||
macro for each mixed case symbol for which you wish to inhibit
|
||||
augmentation. The macro should expand into the lower case equivalent of
|
||||
itself. For example:
|
||||
|
||||
@example
|
||||
#define StuDlyCapS studlycaps
|
||||
@end example
|
||||
|
||||
These macro definitions can be placed in a header file to minimize the
|
||||
number of changes to your source code.
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
||||
#include "ansidecl.h"
|
||||
#include "f/version.h"
|
||||
|
||||
const char *const ffe_version_string = "3.2.2 20030205 (release)";
|
@ -1,6 +0,0 @@
|
||||
#ifndef GCC_F_VERSION_H
|
||||
#define GCC_F_VERSION_H
|
||||
|
||||
extern const char *const ffe_version_string;
|
||||
|
||||
#endif /* ! GCC_F_VERSION_H */
|
@ -1,36 +0,0 @@
|
||||
/* Empty GC callbacks to be used by languages that don't support GC.
|
||||
Copyright (C) 1999, 2000 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. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "rtl.h"
|
||||
#include "tree.h"
|
||||
#include "tm_p.h"
|
||||
#include "ggc.h"
|
||||
|
||||
void ATTRIBUTE_NORETURN
|
||||
lang_mark_tree (t)
|
||||
union tree_node *t ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* If this function is called, we are doing GC. But, this file is
|
||||
only included in compilers for languages that don't support GC. */
|
||||
abort ();
|
||||
}
|
||||
|
@ -1,399 +0,0 @@
|
||||
/* OSF/rose half-pic support functions.
|
||||
Copyright (C) 1992, 1997, 1998, 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. */
|
||||
|
||||
/* The OSF/rose half-pic model assumes that the non-library code does
|
||||
not need to have full PIC (position independent code), but rather,
|
||||
that pointers to external references are put into the data section
|
||||
and dereferenced as normal pointers. References to static data does
|
||||
not need to be PIC-ized.
|
||||
|
||||
Another optimization is to have the compiler know what symbols are
|
||||
in the shared libraries, and to only lay down the pointers to
|
||||
things which in the library proper. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HALF_PIC_INIT
|
||||
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "rtl.h"
|
||||
#include "expr.h"
|
||||
#include "output.h"
|
||||
#include "obstack.h"
|
||||
#include "halfpic.h"
|
||||
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_free free
|
||||
|
||||
int flag_half_pic = 0; /* Global half-pic flag. */
|
||||
int half_pic_number_ptrs = 0; /* # distinct pointers found */
|
||||
int half_pic_number_refs = 0; /* # half-pic references */
|
||||
int (*ptr_half_pic_address_p) PARAMS ((rtx)) = half_pic_address_p;
|
||||
|
||||
/* Obstack to hold generated pic names. */
|
||||
static struct obstack half_pic_obstack;
|
||||
|
||||
/* List of pointers created to pic references. */
|
||||
|
||||
struct all_refs {
|
||||
struct all_refs *hash_next; /* next name in hash chain */
|
||||
struct all_refs *next; /* next name created */
|
||||
int external_p; /* name is an external reference */
|
||||
int pointer_p; /* pointer created. */
|
||||
const char *ref_name; /* reference name to ptr to real_name */
|
||||
int ref_len; /* reference name length */
|
||||
const char *real_name; /* real function/data name */
|
||||
int real_len; /* strlen (real_name) */
|
||||
};
|
||||
|
||||
static struct all_refs *half_pic_names;
|
||||
|
||||
static const char *half_pic_prefix;
|
||||
static int half_pic_prefix_len;
|
||||
|
||||
|
||||
/* Return the hash bucket of a name or NULL. The hash chain is
|
||||
organized as a self reorganizing circularly linked chain. It is
|
||||
assumed that any name passed to use will never be reallocated. For
|
||||
names in SYMBOL_REF's this is true, because the names are allocated
|
||||
on the permanent obstack. */
|
||||
|
||||
#ifndef MAX_HASH_TABLE
|
||||
#define MAX_HASH_TABLE 1009
|
||||
#endif
|
||||
|
||||
#define HASHBITS 30
|
||||
|
||||
static struct all_refs *half_pic_hash PARAMS ((const char *, int, int));
|
||||
|
||||
static struct all_refs *
|
||||
half_pic_hash (name, len, create_p)
|
||||
const char *name; /* name to hash */
|
||||
int len; /* length of the name (or 0 to call strlen) */
|
||||
int create_p; /* != 0 to create new hash bucket if new */
|
||||
{
|
||||
static struct all_refs *hash_table[MAX_HASH_TABLE];
|
||||
static struct all_refs zero_all_refs;
|
||||
|
||||
const unsigned char *uname;
|
||||
int hash;
|
||||
int i;
|
||||
int ch;
|
||||
struct all_refs *first;
|
||||
struct all_refs *ptr;
|
||||
|
||||
if (len == 0)
|
||||
len = strlen (name);
|
||||
|
||||
/* Compute hash code */
|
||||
uname = (const unsigned char *)name;
|
||||
ch = uname[0];
|
||||
hash = len * 613 + ch;
|
||||
for (i = 1; i < len; i += 2)
|
||||
hash = (hash * 613) + uname[i];
|
||||
|
||||
hash &= (1 << HASHBITS) - 1;
|
||||
hash %= MAX_HASH_TABLE;
|
||||
|
||||
/* See if the name is in the hash table. */
|
||||
ptr = first = hash_table[hash];
|
||||
if (ptr)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (len == ptr->real_len
|
||||
&& ch == *(ptr->real_name)
|
||||
&& !strcmp (name, ptr->real_name))
|
||||
{
|
||||
hash_table[hash] = ptr;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
ptr = ptr->hash_next;
|
||||
}
|
||||
while (ptr != first);
|
||||
}
|
||||
|
||||
/* name not in hash table. */
|
||||
if (!create_p)
|
||||
return (struct all_refs *) 0;
|
||||
|
||||
ptr = (struct all_refs *) obstack_alloc (&half_pic_obstack, sizeof (struct all_refs));
|
||||
*ptr = zero_all_refs;
|
||||
|
||||
ptr->real_name = name;
|
||||
ptr->real_len = len;
|
||||
|
||||
/* Update circular links. */
|
||||
if (first == (struct all_refs *) 0)
|
||||
ptr->hash_next = ptr;
|
||||
|
||||
else
|
||||
{
|
||||
ptr->hash_next = first->hash_next;
|
||||
first->hash_next = ptr;
|
||||
}
|
||||
|
||||
hash_table[hash] = ptr;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
/* Do any half-pic initializations. */
|
||||
|
||||
void
|
||||
half_pic_init ()
|
||||
{
|
||||
flag_half_pic = TRUE;
|
||||
half_pic_prefix = HALF_PIC_PREFIX;
|
||||
half_pic_prefix_len = strlen (half_pic_prefix);
|
||||
obstack_init (&half_pic_obstack);
|
||||
}
|
||||
|
||||
|
||||
/* Write out all pointers to pic references. */
|
||||
|
||||
void
|
||||
half_pic_finish (stream)
|
||||
FILE *stream;
|
||||
{
|
||||
struct all_refs *p = half_pic_names;
|
||||
|
||||
if (!p)
|
||||
return;
|
||||
|
||||
data_section ();
|
||||
for (; p != 0; p = p->next)
|
||||
{
|
||||
/* Emit the pointer if used. */
|
||||
if (p->pointer_p)
|
||||
{
|
||||
ASM_OUTPUT_LABEL (stream, p->ref_name);
|
||||
assemble_aligned_integer (POINTER_SIZE / BITS_PER_UNIT,
|
||||
gen_rtx_SYMBOL_REF (Pmode, p->real_name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Encode in a declaration whether or not it is half-pic. */
|
||||
|
||||
void
|
||||
half_pic_encode (decl)
|
||||
tree decl;
|
||||
{
|
||||
enum tree_code code = TREE_CODE (decl);
|
||||
tree asm_name;
|
||||
struct all_refs *ptr;
|
||||
|
||||
if (!flag_half_pic)
|
||||
return;
|
||||
|
||||
if (code != VAR_DECL && code != FUNCTION_DECL)
|
||||
return;
|
||||
|
||||
asm_name = DECL_ASSEMBLER_NAME (decl);
|
||||
|
||||
if (!asm_name)
|
||||
return;
|
||||
|
||||
#ifdef HALF_PIC_DEBUG
|
||||
if (HALF_PIC_DEBUG)
|
||||
{
|
||||
fprintf (stderr, "\n========== Half_pic_encode %.*s\n",
|
||||
IDENTIFIER_LENGTH (asm_name),
|
||||
IDENTIFIER_POINTER (asm_name));
|
||||
debug_tree (decl);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If this is not an external reference, it can't be half-pic. */
|
||||
if (!DECL_EXTERNAL (decl) && (code != VAR_DECL || !TREE_PUBLIC (decl)))
|
||||
return;
|
||||
|
||||
ptr = half_pic_hash (IDENTIFIER_POINTER (asm_name),
|
||||
IDENTIFIER_LENGTH (asm_name),
|
||||
TRUE);
|
||||
|
||||
ptr->external_p = TRUE;
|
||||
|
||||
#ifdef HALF_PIC_DEBUG
|
||||
if (HALF_PIC_DEBUG)
|
||||
fprintf (stderr, "\n%.*s is half-pic\n",
|
||||
IDENTIFIER_LENGTH (asm_name),
|
||||
IDENTIFIER_POINTER (asm_name));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* Mark that an object is now local, and no longer needs half-pic. */
|
||||
|
||||
void
|
||||
half_pic_declare (name)
|
||||
const char *name;
|
||||
{
|
||||
struct all_refs *ptr;
|
||||
|
||||
if (!flag_half_pic)
|
||||
return;
|
||||
|
||||
ptr = half_pic_hash (name, 0, FALSE);
|
||||
if (!ptr)
|
||||
return;
|
||||
|
||||
ptr->external_p = FALSE;
|
||||
|
||||
#ifdef HALF_PIC_DEBUG
|
||||
if (HALF_PIC_DEBUG)
|
||||
fprintf (stderr, "\n========== Half_pic_declare %s\n", name);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* Mark that an object is explicitly external. */
|
||||
|
||||
void
|
||||
half_pic_external (name)
|
||||
const char *name;
|
||||
{
|
||||
struct all_refs *ptr;
|
||||
|
||||
if (!flag_half_pic)
|
||||
return;
|
||||
|
||||
ptr = half_pic_hash (name, 0, TRUE);
|
||||
if (!ptr)
|
||||
return;
|
||||
|
||||
ptr->external_p = TRUE;
|
||||
|
||||
#ifdef HALF_PIC_DEBUG
|
||||
if (HALF_PIC_DEBUG)
|
||||
fprintf (stderr, "\n========== Half_pic_external %s\n", name);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* Return whether an address is half-pic. */
|
||||
|
||||
int
|
||||
half_pic_address_p (addr)
|
||||
rtx addr;
|
||||
{
|
||||
const char *name;
|
||||
int len;
|
||||
struct all_refs *ptr;
|
||||
|
||||
if (!flag_half_pic)
|
||||
return FALSE;
|
||||
|
||||
switch (GET_CODE (addr))
|
||||
{
|
||||
default:
|
||||
break;
|
||||
|
||||
case CONST:
|
||||
{
|
||||
rtx offset = const0_rtx;
|
||||
addr = eliminate_constant_term (XEXP (addr, 0), &offset);
|
||||
if (GET_CODE (addr) != SYMBOL_REF)
|
||||
return FALSE;
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
case SYMBOL_REF:
|
||||
name = XSTR (addr, 0);
|
||||
|
||||
#ifdef HALF_PIC_DEBUG
|
||||
if (HALF_PIC_DEBUG)
|
||||
fprintf (stderr, "\n========== Half_pic_address_p %s\n", name);
|
||||
#endif
|
||||
|
||||
/* If this is a label, it will have a '*' in front of it. */
|
||||
if (name[0] == '*')
|
||||
return FALSE;
|
||||
|
||||
/* If this is a reference to the actual half-pic pointer, it
|
||||
is obviously not half-pic. */
|
||||
|
||||
len = strlen (name);
|
||||
if (len > half_pic_prefix_len
|
||||
&& half_pic_prefix[0] == name[0]
|
||||
&& !strncmp (name, half_pic_prefix, half_pic_prefix_len))
|
||||
return FALSE;
|
||||
|
||||
ptr = half_pic_hash (name, len, FALSE);
|
||||
if (ptr == (struct all_refs *) 0)
|
||||
return FALSE;
|
||||
|
||||
if (ptr->external_p)
|
||||
{
|
||||
#ifdef HALF_PIC_DEBUG
|
||||
if (HALF_PIC_DEBUG)
|
||||
fprintf (stderr, "%s is half-pic\n", name);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Return the name of the pointer to the PIC function, allocating
|
||||
it if need be. */
|
||||
|
||||
struct rtx_def *
|
||||
half_pic_ptr (operand)
|
||||
rtx operand;
|
||||
{
|
||||
const char *name;
|
||||
struct all_refs *p;
|
||||
int len;
|
||||
|
||||
if (GET_CODE (operand) != SYMBOL_REF)
|
||||
return operand;
|
||||
|
||||
name = XSTR (operand, 0);
|
||||
len = strlen (name);
|
||||
p = half_pic_hash (name, len, FALSE);
|
||||
if (p == (struct all_refs *) 0 || !p->external_p)
|
||||
return operand;
|
||||
|
||||
if (!p->pointer_p)
|
||||
{ /* first time, create pointer */
|
||||
obstack_grow (&half_pic_obstack, half_pic_prefix, half_pic_prefix_len);
|
||||
obstack_grow (&half_pic_obstack, name, len+1);
|
||||
|
||||
p->next = half_pic_names;
|
||||
p->ref_name = (char *) obstack_finish (&half_pic_obstack);
|
||||
p->ref_len = len + half_pic_prefix_len;
|
||||
p->pointer_p = TRUE;
|
||||
|
||||
half_pic_names = p;
|
||||
half_pic_number_ptrs++;
|
||||
}
|
||||
|
||||
half_pic_number_refs++;
|
||||
return gen_rtx_SYMBOL_REF (Pmode, p->ref_name);
|
||||
}
|
||||
|
||||
#endif /* HALF_PIC_INIT */
|
@ -1,67 +0,0 @@
|
||||
/* OSF/rose half-pic support definitions.
|
||||
Copyright (C) 1992, 1996, 1997, 1998, 2000 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. */
|
||||
|
||||
#ifndef NO_HALF_PIC
|
||||
|
||||
/* Declare the variable flag_half_pic as 'int' instead of 'extern
|
||||
int', so that BSS variables are created (even though this is not
|
||||
strict ANSI). This is because rtl.c now refers to the
|
||||
CONSTANT_ADDRESS_P macro, which in turn refers to flag_half_pic,
|
||||
and wants to call half_pic_address_p, whose address we also store
|
||||
in a BSS variable. This way, the gen* programs won't get
|
||||
unknown symbol errors when being linked (flag_half_pic will never
|
||||
be true in the gen* programs). */
|
||||
|
||||
int flag_half_pic; /* Global half-pic flag. */
|
||||
int (*ptr_half_pic_address_p) PARAMS ((struct rtx_def *)); /* ptr to half_pic_address_p () */
|
||||
|
||||
extern int half_pic_number_ptrs; /* # distinct pointers found */
|
||||
extern int half_pic_number_refs; /* # half-pic references */
|
||||
extern void half_pic_encode PARAMS ((union tree_node *)); /* encode whether half-pic */
|
||||
extern void half_pic_declare PARAMS ((const char *)); /* declare object local */
|
||||
extern void half_pic_external PARAMS ((const char *)); /* declare object external */
|
||||
extern void half_pic_init PARAMS ((void)); /* half_pic initialization */
|
||||
extern int half_pic_address_p PARAMS ((struct rtx_def *)); /* true if an address is half-pic */
|
||||
extern struct rtx_def *half_pic_ptr PARAMS ((struct rtx_def *)); /* return RTX for half-pic pointer */
|
||||
#ifdef BUFSIZ
|
||||
extern void half_pic_finish PARAMS ((FILE *)); /* half_pic termination */
|
||||
#endif
|
||||
|
||||
/* Macros to provide access to the half-pic stuff (so they can easily
|
||||
be stubbed out. */
|
||||
|
||||
#define HALF_PIC_P() (flag_half_pic)
|
||||
#define HALF_PIC_NUMBER_PTRS (half_pic_number_ptrs)
|
||||
#define HALF_PIC_NUMBER_REFS (half_pic_number_refs)
|
||||
|
||||
#define HALF_PIC_ENCODE(DECL) half_pic_encode (DECL)
|
||||
#define HALF_PIC_DECLARE(NAME) half_pic_declare (NAME)
|
||||
#define HALF_PIC_EXTERNAL(NAME) half_pic_external (NAME)
|
||||
#define HALF_PIC_INIT() half_pic_init ()
|
||||
#define HALF_PIC_FINISH(STREAM) half_pic_finish (STREAM)
|
||||
#define HALF_PIC_ADDRESS_P(X) ((*ptr_half_pic_address_p) (X))
|
||||
#define HALF_PIC_PTR(X) half_pic_ptr (X)
|
||||
|
||||
/* Prefix for half-pic names */
|
||||
#ifndef HALF_PIC_PREFIX
|
||||
#define HALF_PIC_PREFIX "__pic_"
|
||||
#endif
|
||||
|
||||
#endif /* NO_HALF_PIC */
|
@ -1,218 +0,0 @@
|
||||
/* hash.c -- hash table routines
|
||||
Copyright (C) 1993, 1994, 1998, 2001 Free Software Foundation, Inc.
|
||||
Written by Steve Chamberlain <sac@cygnus.com>
|
||||
|
||||
This file was lifted from BFD, the Binary File Descriptor 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, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "hash.h"
|
||||
#include "obstack.h"
|
||||
#include "toplev.h"
|
||||
|
||||
/* Obstack allocation and deallocation routines. */
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_free free
|
||||
|
||||
/* The default number of entries to use when creating a hash table. */
|
||||
#define DEFAULT_SIZE 1009
|
||||
|
||||
/* Create a new hash table, given a number of entries. */
|
||||
|
||||
void
|
||||
hash_table_init_n (table, newfunc, hash, comp, size)
|
||||
struct hash_table *table;
|
||||
struct hash_entry *(*newfunc) PARAMS ((struct hash_entry *,
|
||||
struct hash_table *,
|
||||
hash_table_key));
|
||||
unsigned long (*hash) PARAMS ((hash_table_key));
|
||||
bool (*comp) PARAMS ((hash_table_key, hash_table_key));
|
||||
unsigned int size;
|
||||
{
|
||||
unsigned int alloc;
|
||||
|
||||
alloc = size * sizeof (struct hash_entry *);
|
||||
obstack_begin (&table->memory, alloc);
|
||||
table->table = ((struct hash_entry **)
|
||||
obstack_alloc (&table->memory, alloc));
|
||||
memset ((PTR) table->table, 0, alloc);
|
||||
table->size = size;
|
||||
table->newfunc = newfunc;
|
||||
table->hash = hash;
|
||||
table->comp = comp;
|
||||
}
|
||||
|
||||
/* Create a new hash table with the default number of entries. */
|
||||
|
||||
void
|
||||
hash_table_init (table, newfunc, hash, comp)
|
||||
struct hash_table *table;
|
||||
struct hash_entry *(*newfunc) PARAMS ((struct hash_entry *,
|
||||
struct hash_table *,
|
||||
hash_table_key));
|
||||
unsigned long (*hash) PARAMS ((hash_table_key));
|
||||
bool (*comp) PARAMS ((hash_table_key, hash_table_key));
|
||||
{
|
||||
hash_table_init_n (table, newfunc, hash, comp, DEFAULT_SIZE);
|
||||
}
|
||||
|
||||
/* Free a hash table. */
|
||||
|
||||
void
|
||||
hash_table_free (table)
|
||||
struct hash_table *table;
|
||||
{
|
||||
obstack_free (&table->memory, (PTR) NULL);
|
||||
}
|
||||
|
||||
/* Look up KEY in TABLE. If CREATE is non-NULL a new entry is
|
||||
created if one does not previously exist. */
|
||||
|
||||
struct hash_entry *
|
||||
hash_lookup (table, key, create, copy)
|
||||
struct hash_table *table;
|
||||
hash_table_key key;
|
||||
int create;
|
||||
hash_table_key (*copy) PARAMS ((struct obstack* memory,
|
||||
hash_table_key key));
|
||||
{
|
||||
unsigned long hash;
|
||||
struct hash_entry *hashp;
|
||||
unsigned int index;
|
||||
|
||||
hash = (*table->hash)(key);
|
||||
|
||||
index = hash % table->size;
|
||||
for (hashp = table->table[index]; hashp != 0; hashp = hashp->next)
|
||||
if (hashp->hash == hash
|
||||
&& (*table->comp)(hashp->key, key))
|
||||
return hashp;
|
||||
|
||||
if (! create)
|
||||
return 0;
|
||||
|
||||
hashp = (*table->newfunc) ((struct hash_entry *) NULL, table, key);
|
||||
if (hashp == 0)
|
||||
return 0;
|
||||
|
||||
if (copy)
|
||||
key = (*copy) (&table->memory, key);
|
||||
|
||||
hashp->key = key;
|
||||
hashp->hash = hash;
|
||||
hashp->next = table->table[index];
|
||||
table->table[index] = hashp;
|
||||
|
||||
return hashp;
|
||||
}
|
||||
|
||||
/* Base method for creating a new hash table entry. */
|
||||
|
||||
struct hash_entry *
|
||||
hash_newfunc (entry, table, p)
|
||||
struct hash_entry *entry;
|
||||
struct hash_table *table;
|
||||
hash_table_key p ATTRIBUTE_UNUSED;
|
||||
{
|
||||
if (entry == 0)
|
||||
entry = ((struct hash_entry *)
|
||||
hash_allocate (table, sizeof (struct hash_entry)));
|
||||
return entry;
|
||||
}
|
||||
|
||||
/* Allocate space in a hash table. */
|
||||
|
||||
PTR
|
||||
hash_allocate (table, size)
|
||||
struct hash_table *table;
|
||||
unsigned int size;
|
||||
{
|
||||
return obstack_alloc (&table->memory, size);
|
||||
}
|
||||
|
||||
/* Traverse a hash table. */
|
||||
|
||||
void
|
||||
hash_traverse (table, func, info)
|
||||
struct hash_table *table;
|
||||
bool (*func) PARAMS ((struct hash_entry *, hash_table_key));
|
||||
PTR info;
|
||||
{
|
||||
unsigned int i;
|
||||
struct hash_entry *p;
|
||||
|
||||
for (i = 0; i < table->size; i++)
|
||||
for (p = table->table[i]; p != 0; p = p->next)
|
||||
if (! (*func) (p, info))
|
||||
return;
|
||||
}
|
||||
|
||||
/* Hash a string. Return a hash-code for the string. */
|
||||
|
||||
unsigned long
|
||||
string_hash (k)
|
||||
hash_table_key k;
|
||||
{
|
||||
const unsigned char *s;
|
||||
unsigned long hash;
|
||||
unsigned char c;
|
||||
unsigned int len;
|
||||
|
||||
s = (const unsigned char *) k;
|
||||
hash = 0;
|
||||
len = 0;
|
||||
|
||||
while ((c = *s++) != '\0')
|
||||
{
|
||||
hash += c + (c << 17);
|
||||
hash ^= hash >> 2;
|
||||
++len;
|
||||
}
|
||||
|
||||
hash += len + (len << 17);
|
||||
hash ^= hash >> 2;
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
/* Compare two strings. Return non-zero iff the two strings are
|
||||
the same. */
|
||||
|
||||
bool
|
||||
string_compare (k1, k2)
|
||||
hash_table_key k1;
|
||||
hash_table_key k2;
|
||||
{
|
||||
return (strcmp ((char*) k1, (char*) k2) == 0);
|
||||
}
|
||||
|
||||
/* Copy K to OBSTACK. */
|
||||
|
||||
hash_table_key
|
||||
string_copy (memory, k)
|
||||
struct obstack *memory;
|
||||
hash_table_key k;
|
||||
{
|
||||
char *new;
|
||||
char *string = (char *) k;
|
||||
|
||||
new = (char *) obstack_alloc (memory, strlen (string) + 1);
|
||||
strcpy (new, string);
|
||||
|
||||
return new;
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
/* Header file for generic hash table support.
|
||||
Copyright (C) 1993, 1994, 1997, 1998, 2001 Free Software Foundation, Inc.
|
||||
Written by Steve Chamberlain <sac@cygnus.com>
|
||||
|
||||
This file was lifted from BFD, the Binary File Descriptor 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, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef IN_GCC
|
||||
#include <ansidecl.h>
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#include "obstack.h"
|
||||
|
||||
typedef PTR hash_table_key;
|
||||
|
||||
/* Hash table routines. There is no way to free up a hash table. */
|
||||
|
||||
/* An element in the hash table. Most uses will actually use a larger
|
||||
structure, and an instance of this will be the first field. */
|
||||
|
||||
struct hash_entry
|
||||
{
|
||||
/* Next entry for this hash code. */
|
||||
struct hash_entry *next;
|
||||
/* The thing being hashed. */
|
||||
hash_table_key key;
|
||||
/* Hash code. This is the full hash code, not the index into the
|
||||
table. */
|
||||
unsigned long hash;
|
||||
};
|
||||
|
||||
/* A hash table. */
|
||||
|
||||
struct hash_table
|
||||
{
|
||||
/* The hash array. */
|
||||
struct hash_entry **table;
|
||||
/* The number of slots in the hash table. */
|
||||
unsigned int size;
|
||||
/* A function used to create new elements in the hash table. The
|
||||
first entry is itself a pointer to an element. When this
|
||||
function is first invoked, this pointer will be NULL. However,
|
||||
having the pointer permits a hierarchy of method functions to be
|
||||
built each of which calls the function in the superclass. Thus
|
||||
each function should be written to allocate a new block of memory
|
||||
only if the argument is NULL. */
|
||||
struct hash_entry *(*newfunc) PARAMS ((struct hash_entry *,
|
||||
struct hash_table *,
|
||||
hash_table_key));
|
||||
/* A function to compute the hash code for a key in the hash table. */
|
||||
unsigned long (*hash) PARAMS ((hash_table_key));
|
||||
/* A function to compare two keys. */
|
||||
bool (*comp) PARAMS ((hash_table_key, hash_table_key));
|
||||
/* An obstack for this hash table. */
|
||||
struct obstack memory;
|
||||
};
|
||||
|
||||
/* Initialize a hash table. */
|
||||
extern void hash_table_init
|
||||
PARAMS ((struct hash_table *,
|
||||
struct hash_entry *(*) (struct hash_entry *,
|
||||
struct hash_table *,
|
||||
hash_table_key),
|
||||
unsigned long (*hash) (hash_table_key),
|
||||
bool (*comp) (hash_table_key, hash_table_key)));
|
||||
|
||||
/* Initialize a hash table specifying a size. */
|
||||
extern void hash_table_init_n
|
||||
PARAMS ((struct hash_table *,
|
||||
struct hash_entry *(*) (struct hash_entry *,
|
||||
struct hash_table *,
|
||||
hash_table_key),
|
||||
unsigned long (*hash) (hash_table_key),
|
||||
bool (*comp) (hash_table_key, hash_table_key),
|
||||
unsigned int size));
|
||||
|
||||
/* Free up a hash table. */
|
||||
extern void hash_table_free PARAMS ((struct hash_table *));
|
||||
|
||||
/* Look up KEY in a hash table. If CREATE is true, a new entry
|
||||
will be created for this KEY if one does not already exist. If
|
||||
COPY is non-NULL, it is used to copy the KEY before storing it in
|
||||
the hash table. */
|
||||
extern struct hash_entry *hash_lookup
|
||||
PARAMS ((struct hash_table *, hash_table_key key, int create,
|
||||
hash_table_key (*copy)(struct obstack*, hash_table_key)));
|
||||
|
||||
/* Base method for creating a hash table entry. */
|
||||
extern struct hash_entry *hash_newfunc
|
||||
PARAMS ((struct hash_entry *, struct hash_table *,
|
||||
hash_table_key key));
|
||||
|
||||
/* Grab some space for a hash table entry. */
|
||||
extern PTR hash_allocate PARAMS ((struct hash_table *,
|
||||
unsigned int));
|
||||
|
||||
/* Traverse a hash table in a random order, calling a function on each
|
||||
element. If the function returns false, the traversal stops. The
|
||||
INFO argument is passed to the function. */
|
||||
extern void hash_traverse PARAMS ((struct hash_table *,
|
||||
bool (*) (struct hash_entry *,
|
||||
hash_table_key),
|
||||
hash_table_key info));
|
||||
|
||||
/* Hash a string K, which is really of type `char*'. */
|
||||
extern unsigned long string_hash PARAMS ((hash_table_key k));
|
||||
|
||||
/* Compare two strings K1, K2 which are really of type `char*'. */
|
||||
extern bool string_compare PARAMS ((hash_table_key k1,
|
||||
hash_table_key k2));
|
||||
|
||||
/* Copy a string K, which is really of type `char*'. */
|
||||
extern hash_table_key string_copy PARAMS ((struct obstack* memory,
|
||||
hash_table_key k));
|
||||
|
@ -1,567 +0,0 @@
|
||||
/* Parse C expressions for CCCP.
|
||||
Copyright (C) 1987, 2000, 2001 Free Software Foundation.
|
||||
Adapted from expread.y of GDB by Paul Rubin, July 1986.
|
||||
Adapted to ANSI C, Richard Stallman, Jan 1987
|
||||
Dusted off, polished, and adapted for use as traditional
|
||||
preprocessor only, Zack Weinberg, Jul 2000
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Parse a C expression from text in a string */
|
||||
|
||||
%{
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "intl.h"
|
||||
#include "tradcpp.h"
|
||||
#include <setjmp.h>
|
||||
|
||||
static int yylex PARAMS ((void));
|
||||
static void yyerror PARAMS ((const char *msgid)) ATTRIBUTE_NORETURN;
|
||||
|
||||
static int parse_number PARAMS ((int));
|
||||
static int parse_escape PARAMS ((const char **));
|
||||
|
||||
static int expression_value;
|
||||
static jmp_buf parse_return_error;
|
||||
|
||||
/* During parsing of a C expression, the pointer to the next
|
||||
character is in this variable. */
|
||||
|
||||
static const char *lexptr;
|
||||
%}
|
||||
|
||||
%union {
|
||||
struct constant {long value; int unsignedp;} integer;
|
||||
int voidval;
|
||||
char *sval;
|
||||
}
|
||||
|
||||
%type <integer> exp exp1 start
|
||||
%token <integer> INT CHAR
|
||||
%token <sval> NAME
|
||||
%token <integer> ERROR
|
||||
|
||||
%right '?' ':'
|
||||
%left ','
|
||||
%left OR
|
||||
%left AND
|
||||
%left '|'
|
||||
%left '^'
|
||||
%left '&'
|
||||
%left EQUAL NOTEQUAL
|
||||
%left '<' '>' LEQ GEQ
|
||||
%left LSH RSH
|
||||
%left '+' '-'
|
||||
%left '*' '/' '%'
|
||||
%right UNARY
|
||||
|
||||
/* %expect 40 */
|
||||
|
||||
%%
|
||||
|
||||
start : exp1
|
||||
{ expression_value = $1.value; }
|
||||
;
|
||||
|
||||
/* Expressions, including the comma operator. */
|
||||
exp1 : exp
|
||||
| exp1 ',' exp
|
||||
{ $$ = $3; }
|
||||
;
|
||||
|
||||
/* Expressions, not including the comma operator. */
|
||||
exp : '-' exp %prec UNARY
|
||||
{ $$.value = - $2.value;
|
||||
$$.unsignedp = $2.unsignedp; }
|
||||
| '!' exp %prec UNARY
|
||||
{ $$.value = ! $2.value;
|
||||
$$.unsignedp = 0; }
|
||||
| '+' exp %prec UNARY
|
||||
{ $$ = $2; }
|
||||
| '~' exp %prec UNARY
|
||||
{ $$.value = ~ $2.value;
|
||||
$$.unsignedp = $2.unsignedp; }
|
||||
| '(' exp1 ')'
|
||||
{ $$ = $2; }
|
||||
;
|
||||
|
||||
/* Binary operators in order of decreasing precedence. */
|
||||
exp : exp '*' exp
|
||||
{ $$.unsignedp = $1.unsignedp || $3.unsignedp;
|
||||
if ($$.unsignedp)
|
||||
$$.value = (unsigned) $1.value * $3.value;
|
||||
else
|
||||
$$.value = $1.value * $3.value; }
|
||||
| exp '/' exp
|
||||
{ if ($3.value == 0)
|
||||
{
|
||||
error ("division by zero in #if");
|
||||
$3.value = 1;
|
||||
}
|
||||
$$.unsignedp = $1.unsignedp || $3.unsignedp;
|
||||
if ($$.unsignedp)
|
||||
$$.value = (unsigned) $1.value / $3.value;
|
||||
else
|
||||
$$.value = $1.value / $3.value; }
|
||||
| exp '%' exp
|
||||
{ if ($3.value == 0)
|
||||
{
|
||||
error ("division by zero in #if");
|
||||
$3.value = 1;
|
||||
}
|
||||
$$.unsignedp = $1.unsignedp || $3.unsignedp;
|
||||
if ($$.unsignedp)
|
||||
$$.value = (unsigned) $1.value % $3.value;
|
||||
else
|
||||
$$.value = $1.value % $3.value; }
|
||||
| exp '+' exp
|
||||
{ $$.value = $1.value + $3.value;
|
||||
$$.unsignedp = $1.unsignedp || $3.unsignedp; }
|
||||
| exp '-' exp
|
||||
{ $$.value = $1.value - $3.value;
|
||||
$$.unsignedp = $1.unsignedp || $3.unsignedp; }
|
||||
| exp LSH exp
|
||||
{ $$.unsignedp = $1.unsignedp;
|
||||
if ($$.unsignedp)
|
||||
$$.value = (unsigned) $1.value << $3.value;
|
||||
else
|
||||
$$.value = $1.value << $3.value; }
|
||||
| exp RSH exp
|
||||
{ $$.unsignedp = $1.unsignedp;
|
||||
if ($$.unsignedp)
|
||||
$$.value = (unsigned) $1.value >> $3.value;
|
||||
else
|
||||
$$.value = $1.value >> $3.value; }
|
||||
| exp EQUAL exp
|
||||
{ $$.value = ($1.value == $3.value);
|
||||
$$.unsignedp = 0; }
|
||||
| exp NOTEQUAL exp
|
||||
{ $$.value = ($1.value != $3.value);
|
||||
$$.unsignedp = 0; }
|
||||
| exp LEQ exp
|
||||
{ $$.unsignedp = 0;
|
||||
if ($1.unsignedp || $3.unsignedp)
|
||||
$$.value =
|
||||
(unsigned) $1.value <= (unsigned) $3.value;
|
||||
else
|
||||
$$.value = $1.value <= $3.value; }
|
||||
| exp GEQ exp
|
||||
{ $$.unsignedp = 0;
|
||||
if ($1.unsignedp || $3.unsignedp)
|
||||
$$.value =
|
||||
(unsigned) $1.value >= (unsigned) $3.value;
|
||||
else
|
||||
$$.value = $1.value >= $3.value; }
|
||||
| exp '<' exp
|
||||
{ $$.unsignedp = 0;
|
||||
if ($1.unsignedp || $3.unsignedp)
|
||||
$$.value =
|
||||
(unsigned) $1.value < (unsigned) $3.value;
|
||||
else
|
||||
$$.value = $1.value < $3.value; }
|
||||
| exp '>' exp
|
||||
{ $$.unsignedp = 0;
|
||||
if ($1.unsignedp || $3.unsignedp)
|
||||
$$.value =
|
||||
(unsigned) $1.value > (unsigned) $3.value;
|
||||
else
|
||||
$$.value = $1.value > $3.value; }
|
||||
| exp '&' exp
|
||||
{ $$.value = $1.value & $3.value;
|
||||
$$.unsignedp = $1.unsignedp || $3.unsignedp; }
|
||||
| exp '^' exp
|
||||
{ $$.value = $1.value ^ $3.value;
|
||||
$$.unsignedp = $1.unsignedp || $3.unsignedp; }
|
||||
| exp '|' exp
|
||||
{ $$.value = $1.value | $3.value;
|
||||
$$.unsignedp = $1.unsignedp || $3.unsignedp; }
|
||||
| exp AND exp
|
||||
{ $$.value = ($1.value && $3.value);
|
||||
$$.unsignedp = 0; }
|
||||
| exp OR exp
|
||||
{ $$.value = ($1.value || $3.value);
|
||||
$$.unsignedp = 0; }
|
||||
| exp '?' exp ':' exp
|
||||
{ $$.value = $1.value ? $3.value : $5.value;
|
||||
$$.unsignedp = $3.unsignedp || $5.unsignedp; }
|
||||
| INT
|
||||
{ $$ = yylval.integer; }
|
||||
| CHAR
|
||||
{ $$ = yylval.integer; }
|
||||
| NAME
|
||||
{ $$.value = 0;
|
||||
$$.unsignedp = 0; }
|
||||
| '#' { $$.value =
|
||||
test_assertion ((unsigned char **) &lexptr); }
|
||||
;
|
||||
%%
|
||||
|
||||
/* Take care of parsing a number (anything that starts with a digit).
|
||||
Set yylval and return the token type; update lexptr.
|
||||
LEN is the number of characters in it. */
|
||||
|
||||
/* maybe needs to actually deal with floating point numbers */
|
||||
|
||||
static int
|
||||
parse_number (olen)
|
||||
int olen;
|
||||
{
|
||||
const char *p = lexptr;
|
||||
long n = 0;
|
||||
int c;
|
||||
int base = 10;
|
||||
int len = olen;
|
||||
|
||||
for (c = 0; c < len; c++)
|
||||
if (p[c] == '.') {
|
||||
/* It's a float since it contains a point. */
|
||||
yyerror ("floating point numbers not allowed in #if expressions");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* Traditionally, all numbers are signed. However, we make it
|
||||
unsigned if requested with a suffix. */
|
||||
yylval.integer.unsignedp = 0;
|
||||
|
||||
if (len >= 3 && (!strncmp (p, "0x", 2) || !strncmp (p, "0X", 2))) {
|
||||
p += 2;
|
||||
base = 16;
|
||||
len -= 2;
|
||||
}
|
||||
else if (*p == '0')
|
||||
base = 8;
|
||||
|
||||
while (len > 0) {
|
||||
c = *p++;
|
||||
len--;
|
||||
if (ISUPPER (c))
|
||||
c = TOLOWER (c);
|
||||
|
||||
if (ISDIGIT (c)
|
||||
|| (base == 16 && ISXDIGIT (c))) {
|
||||
n = (n * base) + hex_value (c);
|
||||
} else {
|
||||
/* `l' means long, and `u' means unsigned. */
|
||||
while (1) {
|
||||
if (c == 'l' || c == 'L')
|
||||
;
|
||||
else if (c == 'u' || c == 'U')
|
||||
yylval.integer.unsignedp = 1;
|
||||
else
|
||||
break;
|
||||
|
||||
if (len == 0)
|
||||
break;
|
||||
c = *p++;
|
||||
len--;
|
||||
}
|
||||
/* Don't look for any more digits after the suffixes. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (len != 0) {
|
||||
yyerror ("invalid number in #if expression");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
lexptr = p;
|
||||
yylval.integer.value = n;
|
||||
return INT;
|
||||
}
|
||||
|
||||
struct token {
|
||||
const char *const operator;
|
||||
const int token;
|
||||
};
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
static const struct token tokentab2[] = {
|
||||
{"&&", AND},
|
||||
{"||", OR},
|
||||
{"<<", LSH},
|
||||
{">>", RSH},
|
||||
{"==", EQUAL},
|
||||
{"!=", NOTEQUAL},
|
||||
{"<=", LEQ},
|
||||
{">=", GEQ},
|
||||
{NULL, ERROR}
|
||||
};
|
||||
|
||||
/* Read one token, getting characters through lexptr. */
|
||||
|
||||
static int
|
||||
yylex ()
|
||||
{
|
||||
int c;
|
||||
int namelen;
|
||||
const char *tokstart;
|
||||
const struct token *toktab;
|
||||
|
||||
retry:
|
||||
|
||||
tokstart = lexptr;
|
||||
c = *tokstart;
|
||||
/* See if it is a special token of length 2. */
|
||||
for (toktab = tokentab2; toktab->operator != NULL; toktab++)
|
||||
if (c == *toktab->operator && tokstart[1] == toktab->operator[1]) {
|
||||
lexptr += 2;
|
||||
return toktab->token;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 0:
|
||||
return 0;
|
||||
|
||||
case ' ':
|
||||
case '\t':
|
||||
case '\r':
|
||||
case '\n':
|
||||
lexptr++;
|
||||
goto retry;
|
||||
|
||||
case '\'':
|
||||
lexptr++;
|
||||
c = *lexptr++;
|
||||
if (c == '\\')
|
||||
c = parse_escape (&lexptr);
|
||||
|
||||
/* Sign-extend the constant if chars are signed on target machine. */
|
||||
{
|
||||
if (flag_signed_char == 0
|
||||
|| ((c >> (CHAR_TYPE_SIZE - 1)) & 1) == 0)
|
||||
yylval.integer.value = c & ((1 << CHAR_TYPE_SIZE) - 1);
|
||||
else
|
||||
yylval.integer.value = c | ~((1 << CHAR_TYPE_SIZE) - 1);
|
||||
}
|
||||
|
||||
yylval.integer.unsignedp = 0;
|
||||
c = *lexptr++;
|
||||
if (c != '\'') {
|
||||
yyerror ("invalid character constant in #if");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
return CHAR;
|
||||
|
||||
/* some of these chars are invalid in constant expressions;
|
||||
maybe do something about them later */
|
||||
case '/':
|
||||
case '+':
|
||||
case '-':
|
||||
case '*':
|
||||
case '%':
|
||||
case '|':
|
||||
case '&':
|
||||
case '^':
|
||||
case '~':
|
||||
case '!':
|
||||
case '@':
|
||||
case '<':
|
||||
case '>':
|
||||
case '(':
|
||||
case ')':
|
||||
case '[':
|
||||
case ']':
|
||||
case '.':
|
||||
case '?':
|
||||
case ':':
|
||||
case '=':
|
||||
case '{':
|
||||
case '}':
|
||||
case ',':
|
||||
case '#':
|
||||
lexptr++;
|
||||
return c;
|
||||
|
||||
case '"':
|
||||
yyerror ("double quoted strings not allowed in #if expressions");
|
||||
return ERROR;
|
||||
}
|
||||
if (ISDIGIT (c)) {
|
||||
/* It's a number */
|
||||
for (namelen = 0;
|
||||
c = tokstart[namelen], is_idchar (c) || c == '.';
|
||||
namelen++)
|
||||
;
|
||||
return parse_number (namelen);
|
||||
}
|
||||
|
||||
if (!is_idstart (c)) {
|
||||
yyerror ("invalid token in expression");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* It is a name. See how long it is. */
|
||||
|
||||
for (namelen = 0;
|
||||
is_idchar (tokstart[namelen]);
|
||||
namelen++)
|
||||
;
|
||||
|
||||
lexptr += namelen;
|
||||
return NAME;
|
||||
}
|
||||
|
||||
|
||||
/* Parse a C escape sequence. STRING_PTR points to a variable
|
||||
containing a pointer to the string to parse. That pointer
|
||||
is updated past the characters we use. The value of the
|
||||
escape sequence is returned.
|
||||
|
||||
A negative value means the sequence \ newline was seen,
|
||||
which is supposed to be equivalent to nothing at all.
|
||||
|
||||
If \ is followed by a null character, we return a negative
|
||||
value and leave the string pointer pointing at the null character.
|
||||
|
||||
If \ is followed by 000, we return 0 and leave the string pointer
|
||||
after the zeros. A value of 0 does not mean end of string. */
|
||||
|
||||
static int
|
||||
parse_escape (string_ptr)
|
||||
const char **string_ptr;
|
||||
{
|
||||
int c = *(*string_ptr)++;
|
||||
switch (c)
|
||||
{
|
||||
case 'a':
|
||||
return TARGET_BELL;
|
||||
case 'b':
|
||||
return TARGET_BS;
|
||||
case 'e':
|
||||
return 033;
|
||||
case 'f':
|
||||
return TARGET_FF;
|
||||
case 'n':
|
||||
return TARGET_NEWLINE;
|
||||
case 'r':
|
||||
return TARGET_CR;
|
||||
case 't':
|
||||
return TARGET_TAB;
|
||||
case 'v':
|
||||
return TARGET_VT;
|
||||
case '\n':
|
||||
return -2;
|
||||
case 0:
|
||||
(*string_ptr)--;
|
||||
return 0;
|
||||
case '^':
|
||||
c = *(*string_ptr)++;
|
||||
if (c == '\\')
|
||||
c = parse_escape (string_ptr);
|
||||
if (c == '?')
|
||||
return 0177;
|
||||
return (c & 0200) | (c & 037);
|
||||
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
{
|
||||
int i = c - '0';
|
||||
int count = 0;
|
||||
while (++count < 3)
|
||||
{
|
||||
c = *(*string_ptr)++;
|
||||
if (c >= '0' && c <= '7')
|
||||
i = (i << 3) + c - '0';
|
||||
else
|
||||
{
|
||||
(*string_ptr)--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((i & ~((1 << CHAR_TYPE_SIZE) - 1)) != 0)
|
||||
{
|
||||
i &= (1 << CHAR_TYPE_SIZE) - 1;
|
||||
warning ("octal character constant does not fit in a byte");
|
||||
}
|
||||
return i;
|
||||
}
|
||||
case 'x':
|
||||
{
|
||||
int i = 0;
|
||||
for (;;)
|
||||
{
|
||||
c = *(*string_ptr)++;
|
||||
if (hex_p (c))
|
||||
i = (i << 4) + hex_value (c);
|
||||
else
|
||||
{
|
||||
(*string_ptr)--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((i & ~((1 << BITS_PER_UNIT) - 1)) != 0)
|
||||
{
|
||||
i &= (1 << BITS_PER_UNIT) - 1;
|
||||
warning ("hex character constant does not fit in a byte");
|
||||
}
|
||||
return i;
|
||||
}
|
||||
default:
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
yyerror (msgid)
|
||||
const char *msgid;
|
||||
{
|
||||
error ("%s", _(msgid));
|
||||
longjmp (parse_return_error, 1);
|
||||
}
|
||||
|
||||
/* This page contains the entry point to this file. */
|
||||
|
||||
/* Parse STRING as an expression, and complain if this fails
|
||||
to use up all of the contents of STRING. */
|
||||
/* We do not support C comments. They should be removed before
|
||||
this function is called. */
|
||||
|
||||
int
|
||||
parse_c_expression (string)
|
||||
const char *string;
|
||||
{
|
||||
lexptr = string;
|
||||
|
||||
if (lexptr == 0 || *lexptr == 0) {
|
||||
error ("empty #if expression");
|
||||
return 0; /* don't include the #if group */
|
||||
}
|
||||
|
||||
/* if there is some sort of scanning error, just return 0 and assume
|
||||
the parsing routine has printed an error message somewhere.
|
||||
there is surely a better thing to do than this. */
|
||||
if (setjmp (parse_return_error))
|
||||
return 0;
|
||||
|
||||
if (yyparse ())
|
||||
return 0; /* actually this is never reached
|
||||
the way things stand. */
|
||||
if (*lexptr)
|
||||
error ("Junk after end of expression.");
|
||||
|
||||
return expression_value; /* set by yyparse () */
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,45 +0,0 @@
|
||||
/* C Compatible Compiler Preprocessor (CCCP)
|
||||
Copyright (C) 1986, 1987, 1989, 2000 Free Software Foundation, Inc.
|
||||
Written by Paul Rubin, June 1986
|
||||
Adapted to ANSI C, Richard Stallman, Jan 1987
|
||||
Dusted off, polished, and adapted for use as traditional
|
||||
preprocessor only, Zack Weinberg, Jul 2000
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef GCC_TRADCPP_H
|
||||
#define GCC_TRADCPP_H
|
||||
|
||||
extern void error PARAMS ((const char *msgid, ...)) ATTRIBUTE_PRINTF_1;
|
||||
extern void warning PARAMS ((const char *msgid, ...)) ATTRIBUTE_PRINTF_1;
|
||||
extern void fatal PARAMS ((const char *msgid, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
|
||||
extern void error_with_line PARAMS ((int, const char *msgid, ...)) ATTRIBUTE_PRINTF_2;
|
||||
extern void error_from_errno PARAMS ((const char *msgid));
|
||||
|
||||
extern void perror_with_name PARAMS ((const char *msgid));
|
||||
extern void pfatal_with_name PARAMS ((const char *msgid)) ATTRIBUTE_NORETURN;
|
||||
extern void fancy_abort PARAMS ((int, const char *)) ATTRIBUTE_NORETURN;
|
||||
|
||||
extern struct hashnode *lookup PARAMS ((const unsigned char *, int, int));
|
||||
extern int parse_c_expression PARAMS ((const char *)); /* in tradcif.y */
|
||||
extern int test_assertion PARAMS ((unsigned char **));
|
||||
extern int flag_signed_char;
|
||||
|
||||
#define is_idchar(x) ISIDNUM(x)
|
||||
#define is_idstart(x) ISIDST(x)
|
||||
#define is_space(x) ISSPACE(x)
|
||||
#define is_nvspace(x) (IS_NVSPACE(x) && x != '\0')
|
||||
|
||||
#endif /* ! GCC_TRADCPP_H */
|
Loading…
Reference in New Issue
Block a user