Annotation of gcc/config/mips/iris5.h, revision 1.1.1.3

1.1       root        1: /* Definitions of target machine for GNU compiler.  Iris version 5.
1.1.1.3 ! root        2:    Copyright (C) 1993, 1995 Free Software Foundation, Inc.
1.1       root        3: 
                      4: This file is part of GNU CC.
                      5: 
                      6: GNU CC is free software; you can redistribute it and/or modify
                      7: it under the terms of the GNU General Public License as published by
                      8: the Free Software Foundation; either version 2, or (at your option)
                      9: any later version.
                     10: 
                     11: GNU CC is distributed in the hope that it will be useful,
                     12: but WITHOUT ANY WARRANTY; without even the implied warranty of
                     13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     14: GNU General Public License for more details.
                     15: 
                     16: You should have received a copy of the GNU General Public License
                     17: along with GNU CC; see the file COPYING.  If not, write to
1.1.1.3 ! root       18: the Free Software Foundation, 59 Temple Place - Suite 330,
        !            19: Boston, MA 02111-1307, USA.  */
1.1       root       20: 
1.1.1.3 ! root       21: #ifndef TARGET_DEFAULT
1.1       root       22: #define        TARGET_DEFAULT  MASK_ABICALLS
1.1.1.3 ! root       23: #endif
1.1       root       24: #define ABICALLS_ASM_OP ".option pic2"
                     25: 
                     26: #include "mips/iris4.h"
                     27: 
1.1.1.2   root       28: /* Irix 5 doesn't use COFF, so disable special COFF handling in collect2.c.  */
                     29: #undef OBJECT_FORMAT_COFF
                     30: 
                     31: /* ??? This is correct, but not very useful, because there is no file that
                     32:    uses this macro.  */
                     33: /* ??? The best way to handle global constructors under ELF is to use .init
                     34:    and .fini sections.  Unfortunately, there is apparently no way to get
                     35:    the Irix 5.x (x <= 2) assembler to create these sections.  So we instead
                     36:    use collect.  The linker can create these sections via -init and -fini
                     37:    options, but using this would require modifying how crtstuff works, and
                     38:    I will leave that for another time (or someone else).  */
                     39: #define OBJECT_FORMAT_ELF
1.1.1.3 ! root       40: #define HAS_INIT_SECTION
        !            41: #define LD_INIT_SWITCH "-init"
        !            42: #define LD_FINI_SWITCH "-fini"
1.1.1.2   root       43: 
                     44: /* Specify wchar_t types.  */
1.1       root       45: #undef WCHAR_TYPE
                     46: #undef WCHAR_TYPE_SIZE
1.1.1.2   root       47: #undef MAX_WCHAR_TYPE_SIZE
1.1       root       48: 
                     49: #define WCHAR_TYPE     "long int"
                     50: #define WCHAR_TYPE_SIZE        LONG_TYPE_SIZE
1.1.1.2   root       51: #define MAX_WCHAR_TYPE_SIZE    MAX_LONG_TYPE_SIZE
1.1       root       52: 
                     53: /* ??? _MIPS_SIM and _MIPS_SZPTR should eventually depend on options when
                     54:    options for them exist.  */
                     55: 
                     56: #undef CPP_PREDEFINES
                     57: #define CPP_PREDEFINES \
1.1.1.2   root       58:  "-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 \
1.1       root       59:   -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \
                     60:   -D_MIPS_SIM=_MIPS_SIM_ABI32 -D_MIPS_SZPTR=32 \
                     61:   -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(sgi)"
                     62: 
                     63: #undef CPP_SPEC
                     64: #define CPP_SPEC "\
                     65: %{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE -D_LONGLONG} \
                     66: %{.cc: -D_LANGUAGE_C_PLUS_PLUS} \
                     67: %{.cxx:        -D_LANGUAGE_C_PLUS_PLUS} \
                     68: %{.C:  -D_LANGUAGE_C_PLUS_PLUS} \
1.1.1.2   root       69: %{.m:  -D_LANGUAGE_OBJECTIVE_C -D_LANGUAGE_C} \
                     70: %{.S:  -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
                     71: %{.s:  -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
                     72: %{!.S:%{!.s: %{!.cc: %{!.cxx: %{!.C: %{!.m: -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}}\
1.1       root       73: %{!mfp64: -D_MIPS_FPSET=16}%{mfp64: -D_MIPS_FPSET=32} \
                     74: %{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \
                     75: %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \
                     76: %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
                     77: %{!mips1: %{!mips2: %{!mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS1}}} \
                     78: %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \
1.1.1.2   root       79: %{!mlong64: -D_MIPS_SZLONG=32}%{mlong64: -D_MIPS_SZLONG=64} \
                     80: %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
                     81: %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
1.1.1.3 ! root       82: %{mips3:-U__mips -D__mips=3 -D__mips64} \
        !            83: %{mgp32:-U__mips64} %{mgp64:-D__mips64} \
        !            84: %{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \
        !            85: %{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}}"
1.1       root       86: 
                     87: #undef LINK_SPEC
                     88: #define LINK_SPEC "\
1.1.1.2   root       89: %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
                     90: %{bestGnum} %{shared} %{non_shared} \
                     91: %{call_shared} %{no_archive} %{exact_version} \
1.1.1.3 ! root       92: %{!shared:%{!non_shared:%{!call_shared: -call_shared -no_unresolved}}} \
1.1.1.2   root       93: -_SYSTYPE_SVR4"
1.1       root       94: 
1.1.1.3 ! root       95: /* We now support shared libraries.  */
        !            96: #undef STARTFILE_SPEC
        !            97: #define STARTFILE_SPEC \
        !            98:   "%{!shared:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}}"
        !            99: 
1.1       root      100: #undef LIB_SPEC
1.1.1.3 ! root      101: #define LIB_SPEC "%{!shared:%{p:-lprof1} %{pg:-lprof1} -lc}"
        !           102: 
        !           103: #undef ENDFILE_SPEC
        !           104: #define ENDFILE_SPEC "%{!shared:crtn.o%s}"
1.1       root      105: 
                    106: /* We do not want to run mips-tfile!  */
                    107: #undef ASM_FINAL_SPEC
                    108: 
1.1.1.2   root      109: /* The system header files are C++ aware. */
                    110: /* ??? Unfortunately, most but not all of the headers are C++ aware.
1.1.1.3 ! root      111:    Specifically, curses.h is not, and as a consequence, defining this
        !           112:    used to prevent libg++ building.  This is no longer the case so
        !           113:    define it again to prevent other problems, e.g. with getopt in
        !           114:    unistd.h.  We still need some way to fix just those files that need
        !           115:    fixing.  */
        !           116: #define NO_IMPLICIT_EXTERN_C 1
1.1       root      117: 
                    118: /* We don't support debugging info for now. */
                    119: #undef DBX_DEBUGGING_INFO
                    120: #undef SDB_DEBUGGING_INFO
                    121: #undef MIPS_DEBUGGING_INFO
                    122: 
                    123: #undef MACHINE_TYPE
1.1.1.3 ! root      124: #define MACHINE_TYPE "SGI running IRIX 5.x"
        !           125: #undef NO_DOLLAR_IN_LABEL
1.1       root      126: 
1.1.1.2   root      127: /* -G is incompatible with -KPIC which is the default, so only allow objects
                    128:    in the small data section if the user explicitly asks for it.  */
                    129: #undef MIPS_DEFAULT_GVALUE
                    130: #define MIPS_DEFAULT_GVALUE 0
                    131: 
                    132: /* In Irix 5, we must output a `.global name .text' directive for every used
                    133:    but undefined function.  If we don't, the linker may perform an optimization
                    134:    (skipping over the insns that set $gp) when it is unsafe.  This is used
                    135:    indirectly by ASM_OUTPUT_EXTERNAL.  */
                    136: #define ASM_OUTPUT_UNDEF_FUNCTION(FILE, NAME)  \
                    137: do {                                           \
                    138:   fputs ("\t.globl ", FILE);                   \
                    139:   assemble_name (FILE, NAME);                  \
                    140:   fputs (" .text\n", FILE);                    \
                    141: } while (0)
                    142: 
                    143: /* Also do this for libcalls.  */
                    144: #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
                    145:   mips_output_external_libcall (FILE, XSTR (FUN, 0))
                    146: 
                    147: /* This does for functions what ASM_DECLARE_OBJECT_NAME does for variables.
                    148:    This is used indirectly by ASM_OUTPUT_EXTERNAL.  */
                    149: #define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL)  \
                    150: do {                                                   \
                    151:   tree name_tree = get_identifier (NAME);              \
                    152:   TREE_ASM_WRITTEN (name_tree) = 1;                    \
                    153: } while (0)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.