summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1991-12-01 04:57:16 +0000
committerRichard Stallman <rms@gnu.org>1991-12-01 04:57:16 +0000
commitea76e85da8e1b01e32aa158babc6e48d5848cae0 (patch)
treefef1f2e84f42b27cf6f7fd0d8ea4791860d01b74 /gcc/config
parent868df7f7f9a31877be4e4acbc1095072f1e6d362 (diff)
downloadgcc-ea76e85da8e1b01e32aa158babc6e48d5848cae0.tar.gz
Initial revision
From-SVN: r86
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/isccoff.h36
-rw-r--r--gcc/config/m68k/apollo68.h180
-rw-r--r--gcc/config/m68k/hp2bsd.h69
-rw-r--r--gcc/config/ns32k/genix.h163
4 files changed, 448 insertions, 0 deletions
diff --git a/gcc/config/i386/isccoff.h b/gcc/config/i386/isccoff.h
new file mode 100644
index 00000000000..69fab57aa10
--- /dev/null
+++ b/gcc/config/i386/isccoff.h
@@ -0,0 +1,36 @@
+/* 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. */
+
+/* Mostly it's like AT&T Unix System V. */
+
+#include "i386v.h"
+
+/* Use crt0.o or crt1.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:crtp0.o%s}}}\
+ %{!posix:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}\
+ %{p:-L/lib/libp} %{pg:-L/lib/libp}}}\
+ %{shlib:%{posix:crtp1.o%s}%{!posix:crt1.o%s}} "
+
+#define ENDFILE_SPEC "crtn.o%s"
+
+/* Library spec */
+#undef LIB_SPEC
+#define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc"
+
+/* caller has to pop the extra argument passed to functions that return
+ structures. */
+
+#undef RETURN_POPS_ARGS
+#define RETURN_POPS_ARGS(FUNTYPE,SIZE) \
+ (TREE_CODE (FUNTYPE) == 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 (FUNTYPE)) ? GET_MODE_SIZE (Pmode) : 0) */
+
diff --git a/gcc/config/m68k/apollo68.h b/gcc/config/m68k/apollo68.h
new file mode 100644
index 00000000000..4365a8ddab4
--- /dev/null
+++ b/gcc/config/m68k/apollo68.h
@@ -0,0 +1,180 @@
+/* Definitions of target machine for GNU compiler. Apollo 680X0 version.
+ Copyright (C) 1989 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "m68k.h"
+
+/* This symbol may be tested in other files for special Apollo handling */
+
+#define TM_APOLLO
+
+/* See m68k.h. 7 means 68020 with 68881. */
+
+#ifndef TARGET_DEFAULT
+#define TARGET_DEFAULT 7
+#endif
+
+/* Target switches for the Apollo is the same as in m68k.h, except
+ there is no Sun FPA. */
+
+#undef TARGET_SWITCHES
+#define TARGET_SWITCHES \
+ { { "68020", 5}, \
+ { "c68020", 5}, \
+ { "68881", 2}, \
+ { "bitfield", 4}, \
+ { "68000", -5}, \
+ { "c68000", -5}, \
+ { "soft-float", -0102}, \
+ { "nobitfield", -4}, \
+ { "rtd", 8}, \
+ { "nortd", -8}, \
+ { "short", 040}, \
+ { "noshort", -040}, \
+ { "", TARGET_DEFAULT}}
+
+/* Define __HAVE_68881__ in preprocessor,
+ according to the -m flags.
+ This will control the use of inline 68881 insns in certain macros.
+ Also inform the program which CPU this is for. */
+
+#if TARGET_DEFAULT & 02
+
+/* -m68881 is the default */
+#define CPP_SPEC \
+"%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}\
+%{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\
+%{!ansi:-D_APOLLO_SOURCE}}"
+
+#else
+
+/* -msoft-float is the default */
+#define CPP_SPEC \
+"%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\
+%{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\
+%{!ansi:-D_APOLLO_SOURCE}}"
+
+#endif
+
+/* Names to predefine in the preprocessor for this target machine. */
+/* These are the ones defined by Apollo, plus mc68000 for uniformity with
+ GCC on other 68000 systems. */
+
+#define CPP_PREDEFINES "-Dapollo -Daegis -Dunix"
+
+/* cpp has to support a #sccs directive for the /usr/include files */
+
+#define SCCS_DIRECTIVE
+
+/* Allow #ident but output nothing for it. */
+
+#define IDENT_DIRECTIVE
+#define ASM_OUTPUT_IDENT(FILE, NAME)
+
+/* Allow dollarsigns in identifiers */
+
+#define DOLLARS_IN_IDENTIFIERS 2
+
+/* -m68000 requires special flags to the assembler.
+ The -C flag is passed to a modified GNU assembler to cause COFF
+ modules to be produced. Remove it if you're not using this.
+ (See vasta@apollo.com.) */
+
+#define ASM_SPEC \
+ "-C %{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
+
+/* STARTFILE_SPEC
+ Note that includes knowledge of the default specs for gcc, ie. no
+ args translates to the same effect as -m68881 */
+
+#if TARGET_DEFAULT & 2
+/* -m68881 is the default */
+#define STARTFILE_SPEC \
+ "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
+#else
+/* -msoft-float is the default */
+#define STARTFILE_SPEC \
+ "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
+#endif
+
+/* Specify library to handle `-a' basic block profiling. */
+
+#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \
+%{a:/usr/lib/bb_link.o} "
+
+/* Debugging is not supported yet */
+
+#undef DBX_DEBUGGING_INFO
+#undef SDB_DEBUGGING_INFO
+
+/* Every structure or union's size must be a multiple of 2 bytes. */
+
+#define STRUCTURE_SIZE_BOUNDARY 16
+
+/* Functions which return large structures get the address
+ to place the wanted value at offset 8 from the frame. */
+
+#undef PCC_STATIC_STRUCT_RETURN
+#undef STRUCT_VALUE_REGNUM
+
+/* Caller treats address of return area like a parm. */
+#define STRUCT_VALUE 0
+
+#define STRUCT_VALUE_INCOMING \
+ gen_rtx (MEM, Pmode, \
+ gen_rtx (PLUS, SImode, frame_pointer_rtx, \
+ gen_rtx (CONST_INT, VOIDmode, 8)))
+
+/* Boundary (in *bits*) on which stack pointer should be aligned. */
+#undef STACK_BOUNDARY
+#define STACK_BOUNDARY 32
+
+/* Specify how to pad function arguments.
+ Arguments are not padded at all; the stack is kept aligned on long
+ boundaries. */
+
+#define FUNCTION_ARG_PADDING(mode, size) none
+
+/* Short integral argument prototype promotion is not done */
+
+#undef PROMOTE_PROTOTYPES
+
+/* The definition of this macro imposes a limit on the size of
+ an aggregate object which can be treated as if it were a scalar
+ object. */
+
+#define MAX_FIXED_MODE_SIZE BITS_PER_WORD
+
+/* The definition of this macro implies that there are cases where
+ a scalar value cannot be returned in registers.
+ For Apollo, anything larger than one integer register is returned
+ using the structure-value mechanism, i.e. objects of DFmode are
+ returned that way. */
+
+#define RETURN_IN_MEMORY(type) \
+ (GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD)
+
+/* This is how to output a reference to a user-level label named NAME.
+ In order to link to Apollo libraries, no underscore is prepended to names.
+ `assemble_name' uses this. */
+
+#undef ASM_OUTPUT_LABELREF
+#define ASM_OUTPUT_LABELREF(FILE,NAME) \
+ fprintf (FILE, "%s", NAME)
+
+
diff --git a/gcc/config/m68k/hp2bsd.h b/gcc/config/m68k/hp2bsd.h
new file mode 100644
index 00000000000..3392634d23d
--- /dev/null
+++ b/gcc/config/m68k/hp2bsd.h
@@ -0,0 +1,69 @@
+/* Definitions of target machine for GNU compiler. HP 9000/200 68000 version.
+ Copyright (C) 1987 - 1991 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "m68k.h"
+
+/* See m68k.h. 0 means 68000 with no 68881. */
+
+#define TARGET_DEFAULT -0102
+
+/* Define __HAVE_68881 in preprocessor only if -m68881 is specified.
+ This will control the use of inline 68881 insns in certain macros.
+ Also inform the program which CPU this is for. */
+
+#define CPP_SPEC "%{m68881:-D__HAVE_68881__} \
+%{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{!mc68020:%{!m68020:-Dmc68010}}}"
+
+/* -m68020 requires special flags to the assembler. */
+
+#define ASM_SPEC \
+ "%{m68020:-mc68020}%{mc68020:-mc68020}%{!mc68020:%{!m68020:-mc68010}}"
+
+/* Names to predefine in the preprocessor for this target machine. */
+
+#define CPP_PREDEFINES "-Dmc68000 -Dmc68010 -Dhp200 -Dunix"
+
+/* Link with libg.a when debugging, for dbx's sake. */
+
+#define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} "
+
+/* Alignment of field after `int : 0' in a structure. */
+
+#undef EMPTY_FIELD_BOUNDARY
+#define EMPTY_FIELD_BOUNDARY 16
+
+/* Every structure or union's size must be a multiple of 2 bytes. */
+
+#define STRUCTURE_SIZE_BOUNDARY 16
+
+/* This is BSD, so it wants DBX format. */
+
+#define DBX_DEBUGGING_INFO
+
+/* Define subroutines to call to handle multiply, divide, and remainder.
+ These routines are built into the c-library on the hp200.
+ XXX What other routines from the c-library could we use?
+ The `*' prevents an underscore from being prepended by the compiler. */
+
+#define DIVSI3_LIBCALL "*ldiv"
+#define UDIVSI3_LIBCALL "*uldiv"
+#define MODSI3_LIBCALL "*lrem"
+#define UMODSI3_LIBCALL "*ulrem"
+#define MULSI3_LIBCALL "*lmul"
+#define UMULSI3_LIBCALL "*ulmul"
diff --git a/gcc/config/ns32k/genix.h b/gcc/config/ns32k/genix.h
new file mode 100644
index 00000000000..f0fe09cb807
--- /dev/null
+++ b/gcc/config/ns32k/genix.h
@@ -0,0 +1,163 @@
+/* Definitions of target machine for GNU compiler. Genix ns32000 version.
+ Copyright (C) 1987, 1988 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "encore.h"
+
+/* We don't want the one Encore needs. */
+#undef ASM_SPEC
+
+/* The following defines override ones in ns32k.h and prevent any attempts
+ to explicitly or implicitly make references to the SB register in the GCC
+ generated code. It is necessary to avoid such references under Genix V.3.1
+ because this OS doesn't even save/restore the SB on context switches! */
+
+#define IS_OK_REG_FOR_BASE_P(X) \
+ ( (GET_CODE (X) == REG) && REG_OK_FOR_BASE_P (X) )
+
+#undef INDIRECTABLE_1_ADDRESS_P
+#define INDIRECTABLE_1_ADDRESS_P(X) \
+ (CONSTANT_ADDRESS_NO_LABEL_P (X) \
+ || IS_OK_REG_FOR_BASE_P (X) \
+ || (GET_CODE (X) == PLUS \
+ && IS_OK_REG_FOR_BASE_P (XEXP (X, 0)) \
+ && CONSTANT_ADDRESS_P (XEXP (X, 1)) ) )
+
+/* Note that for double indirects, only FP, SP, and SB are allowed
+ as the inner-most base register. But we are avoiding use of SB. */
+
+#undef MEM_REG
+#define MEM_REG(X) \
+ ( (GET_CODE (X) == REG) \
+ && ( (REGNO (X) == FRAME_POINTER_REGNUM) \
+ || (REGNO (X) == STACK_POINTER_REGNUM) ) )
+
+#undef INDIRECTABLE_2_ADDRESS_P
+#define INDIRECTABLE_2_ADDRESS_P(X) \
+ (GET_CODE (X) == MEM \
+ && (((xfoo0 = XEXP (X, 0), MEM_REG (xfoo0)) \
+ || (GET_CODE (xfoo0) == PLUS \
+ && MEM_REG (XEXP (xfoo0, 0)) \
+ && CONSTANT_ADDRESS_NO_LABEL_P (XEXP (xfoo0, 1)))) \
+ || CONSTANT_ADDRESS_NO_LABEL_P (xfoo0)))
+
+/* Go to ADDR if X is a valid address not using indexing.
+ (This much is the easy part.) */
+#undef GO_IF_NONINDEXED_ADDRESS
+#define GO_IF_NONINDEXED_ADDRESS(X, ADDR) \
+{ register rtx xfoob = (X); \
+ if (GET_CODE (xfoob) == REG) goto ADDR; \
+ if (INDIRECTABLE_1_ADDRESS_P(X)) goto ADDR; \
+ if (CONSTANT_P(X)) goto ADDR; \
+ if (INDIRECTABLE_2_ADDRESS_P (X)) goto ADDR; \
+ if (GET_CODE (X) == PLUS) \
+ if (CONSTANT_ADDRESS_NO_LABEL_P (XEXP (X, 1))) \
+ if (INDIRECTABLE_2_ADDRESS_P (XEXP (X, 0))) \
+ goto ADDR; \
+}
+
+/* A bug in the GNX 3.X assembler causes references to external symbols to
+ be mishandled if the symbol is also used as the name of a function-local
+ variable or as the name of a struct or union field. The problem only
+ appears when you are also using the -g option so that SDB debugging
+ directives are also being produced by GCC. In such cases, the assembler
+ gets the external entity confused with the local entity and addressing
+ havoc ensues. The solution is to get GCC to produce .global directives
+ for all external entities which are actually referenced within the current
+ source file. The following macro does this. */
+
+#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
+ ASM_GLOBALIZE_LABEL(FILE,NAME);
+
+/* Genix wants 0l instead of 0f. */
+
+#undef ASM_OUTPUT_DOUBLE
+#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
+ fprintf (FILE, "\t.long 0l%.20e\n", (VALUE))
+
+/* A bug in the GNX 3.X linker prevents symbol-table entries with a storage-
+ class field of C_EFCN (-1) from being accepted. */
+
+#ifdef PUT_SDB_EPILOGUE_END
+#undef PUT_SDB_EPILOGUE_END
+#endif
+#define PUT_SDB_EPILOGUE_END(NAME)
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (32000, National syntax)");
+
+/* Same as the encore definition except
+ * Different syntax for double constants.
+ * Don't output `?' before external regs.
+ * Output `(sb)' in certain indirect refs. */
+
+#undef PRINT_OPERAND
+#define PRINT_OPERAND(FILE, X, CODE) \
+{ if (CODE == '$') putc ('$', FILE); \
+ else if (CODE == '?'); \
+ else if (GET_CODE (X) == REG) \
+ fprintf (FILE, "%s", reg_names[REGNO (X)]); \
+ else if (GET_CODE (X) == MEM) \
+ { \
+ rtx xfoo; \
+ xfoo = XEXP (X, 0); \
+ switch (GET_CODE (xfoo)) \
+ { \
+ case MEM: \
+ if (GET_CODE (XEXP (xfoo, 0)) == REG) \
+ if (REGNO (XEXP (xfoo, 0)) == STACK_POINTER_REGNUM) \
+ fprintf (FILE, "0(0(sp))"); \
+ else fprintf (FILE, "0(0(%s))", \
+ reg_names[REGNO (XEXP (xfoo, 0))]); \
+ else \
+ { \
+ extern int paren_base_reg_printed; \
+ fprintf (FILE, "0("); \
+ paren_base_reg_printed = 0; \
+ output_address (xfoo); \
+ if (!paren_base_reg_printed) \
+ fprintf (FILE, "(sb)"); \
+ putc (')', FILE); \
+ } \
+ break; \
+ case REG: \
+ fprintf (FILE, "0(%s)", reg_names[REGNO (xfoo)]); \
+ break; \
+ case PRE_DEC: \
+ case POST_INC: \
+ fprintf (FILE, "tos"); \
+ break; \
+ case CONST_INT: \
+ fprintf (FILE, "@%d", INTVAL (xfoo)); \
+ break; \
+ default: \
+ output_address (xfoo); \
+ break; \
+ } \
+ } \
+ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != DImode) \
+ if (GET_MODE (X) == DFmode) \
+ { union { double d; int i[2]; } u; \
+ u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \
+ fprintf (FILE, "$0l%.20e", u.d); } \
+ else { union { double d; int i[2]; } u; \
+ u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \
+ fprintf (FILE, "$0f%.20e", u.d); } \
+ else if (GET_CODE (X) == CONST) \
+ output_addr_const (FILE, X); \
+ else { putc ('$', FILE); output_addr_const (FILE, X); }}