Annotation of gcc/config/mips/iris6.h, revision 1.1

1.1     ! root        1: /* Definitions of target machine for GNU compiler.  Iris version 6.
        !             2:    Copyright (C) 1994, 1995 Free Software Foundation, Inc.
        !             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
        !            18: the Free Software Foundation, 59 Temple Place - Suite 330,
        !            19: Boston, MA 02111-1307, USA.  */
        !            20: 
        !            21: /* Irix 6 uses DWARF.  */
        !            22: #define DWARF_DEBUGGING_INFO
        !            23: #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
        !            24: 
        !            25: /* Default to -mips4.  */
        !            26: #define TARGET_DEFAULT MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT
        !            27: #define MIPS_ISA_DEFAULT 4
        !            28: #define MULTILIB_DEFAULTS { "EB", "mips4" }
        !            29: 
        !            30: #include "mips/iris5gas.h"
        !            31: #include "mips/abi64.h"
        !            32: 
        !            33: /* The Irix 6.0.1 assembler doesn't like labels in the text section, so
        !            34:    just avoid emitting them.  */
        !            35: #define ASM_IDENTIFY_GCC
        !            36: #define ASM_IDENTIFY_LANGUAGE
        !            37: 
        !            38: /* Irix 5 stuff that we don't need for Irix 6.  */
        !            39: #undef ASM_OUTPUT_UNDEF_FUNCTION
        !            40: #undef ASM_OUTPUT_EXTERNAL_LIBCALL
        !            41: #undef ASM_DECLARE_FUNCTION_SIZE
        !            42: 
        !            43: /* Stuff we need for Irix 6 that isn't in Irix 5.  */
        !            44: 
        !            45: #undef SET_ASM_OP      /* Has no equivalent.  See ASM_OUTPUT_DEF below.  */
        !            46: 
        !            47: /* This is how to equate one symbol to another symbol.  The syntax used is
        !            48:    `SYM1=SYM2'.  Note that this is different from the way equates are done
        !            49:    with most svr4 assemblers, where the syntax is `.set SYM1,SYM2'.  */
        !            50: 
        !            51: #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                             \
        !            52:  do {  fprintf ((FILE), "\t");                                         \
        !            53:        assemble_name (FILE, LABEL1);                                   \
        !            54:        fprintf (FILE, " = ");                                          \
        !            55:        assemble_name (FILE, LABEL2);                                   \
        !            56:        fprintf (FILE, "\n");                                           \
        !            57:   } while (0)
        !            58: 
        !            59: #define POPSECTION_ASM_OP      ".popsection"
        !            60: 
        !            61: #define DEBUG_SECTION          ".debug,1,0,0,1"
        !            62: #define LINE_SECTION           ".line,1,0,0,1"
        !            63: #define SFNAMES_SECTION                ".debug_sfnames,1,0,0,1"
        !            64: #define SRCINFO_SECTION                ".debug_srcinfo,1,0,0,1"
        !            65: #define MACINFO_SECTION                ".debug_macinfo,1,0,0,1"
        !            66: #define PUBNAMES_SECTION       ".debug_pubnames,1,0,0,1"
        !            67: #define ARANGES_SECTION                ".debug_aranges,1,0,0,1"
        !            68: 
        !            69: #undef ASM_SPEC
        !            70: #if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GAS) != 0
        !            71: /* GAS */
        !            72: #define ASM_SPEC "\
        !            73: %{mmips-as: \
        !            74:        %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \
        !            75:        %{pipe: %e-pipe is not supported.} \
        !            76:        %{K}} \
        !            77: %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} %{v} \
        !            78: %{noasmopt:-O0} \
        !            79: %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \
        !            80: %{g} %{g0} %{g1} %{g2} %{g3} \
        !            81: %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \
        !            82: %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
        !            83: %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
        !            84: %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \
        !            85: %{membedded-pic}"
        !            86: 
        !            87: #else
        !            88: /* not GAS */
        !            89: /* Must pass -g0 to the assembler, otherwise it may overwrite our
        !            90:    debug info with its own debug info. */
        !            91: /* Must pass -show instead of -v.  */
        !            92: /* Must pass -G 0 to the assembler, otherwise we may get warnings about
        !            93:    GOT overflow.  */
        !            94: #define ASM_SPEC "\
        !            95: %{!mgas: \
        !            96:        %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \
        !            97:        %{pipe: %e-pipe is not supported.} \
        !            98:        %{K}} \
        !            99: %{G*} %{EB} %{EL} %{v:-show} \
        !           100: %{mips1} %{mips2} %{mips3} %{mips4} \
        !           101: %{!mips1: %{!mips2: %{!mips3: %{!mips4: -mips4}}}} \
        !           102: %{noasmopt:-O0} %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \
        !           103: -g0 -G 0 %{membedded-pic}"
        !           104: 
        !           105: #endif
        !           106: 
        !           107: /* Stuff for constructors.  Start here.  */
        !           108: 
        !           109: /* The assembler now accepts .section pseudo-ops, but it does not allow
        !           110:    one to change the section in the middle of a function.  crtstuff relies
        !           111:    on this hack, and thus crtstuff won't work here.  So, we do init and
        !           112:    fini sections exactly the same way as they are done for Irix 5, and
        !           113:    we ifdef out the ASM_OUTPUT_{CON,DE}STRUCTOR macros below.  */
        !           114: 
        !           115: #define CONST_SECTION_ASM_OP_32        "\t.rdata"
        !           116: #define CONST_SECTION_ASM_OP_64        ".section\t.rodata"
        !           117: #define CTORS_SECTION_ASM_OP   ".section\t.ctors,1,2,0,4"
        !           118: #define DTORS_SECTION_ASM_OP   ".section\t.dtors,1,2,0,4"
        !           119: 
        !           120: /* This is the pseudo-op used to generate a 32-bit word of data with a
        !           121:    specific value in some section.  This is the same for all known svr4
        !           122:    assemblers.  */
        !           123: 
        !           124: #define INT_ASM_OP             ".word"
        !           125: 
        !           126: /* A default list of other sections which we might be "in" at any given
        !           127:    time.  For targets that use additional sections (e.g. .tdesc) you
        !           128:    should override this definition in the target-specific file which
        !           129:    includes this file.  */
        !           130: 
        !           131: #undef EXTRA_SECTIONS
        !           132: #define EXTRA_SECTIONS in_sdata, in_rdata, in_const, in_ctors, in_dtors, in_bss
        !           133: 
        !           134: /* A default list of extra section function definitions.  For targets
        !           135:    that use additional sections (e.g. .tdesc) you should override this
        !           136:    definition in the target-specific file which includes this file.  */
        !           137: 
        !           138: /* ??? rdata_section is now same as svr4 const_section.  */
        !           139: 
        !           140: #undef EXTRA_SECTION_FUNCTIONS
        !           141: #define EXTRA_SECTION_FUNCTIONS                                                \
        !           142: void                                                                   \
        !           143: sdata_section ()                                                       \
        !           144: {                                                                      \
        !           145:   if (in_section != in_sdata)                                          \
        !           146:     {                                                                  \
        !           147:       fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP);            \
        !           148:       in_section = in_sdata;                                           \
        !           149:     }                                                                  \
        !           150: }                                                                      \
        !           151:                                                                        \
        !           152: void                                                                   \
        !           153: rdata_section ()                                                       \
        !           154: {                                                                      \
        !           155:   if (in_section != in_rdata)                                          \
        !           156:     {                                                                  \
        !           157:       if (mips_isa >= 3)                                               \
        !           158:        fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_64);        \
        !           159:       else                                                             \
        !           160:        fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_32);        \
        !           161:       in_section = in_rdata;                                           \
        !           162:     }                                                                  \
        !           163: }                                                                      \
        !           164:   CTORS_SECTION_FUNCTION                                               \
        !           165:   DTORS_SECTION_FUNCTION
        !           166: 
        !           167: #define CTORS_SECTION_FUNCTION                                         \
        !           168: void                                                                   \
        !           169: ctors_section ()                                                       \
        !           170: {                                                                      \
        !           171:   if (in_section != in_ctors)                                          \
        !           172:     {                                                                  \
        !           173:       fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);            \
        !           174:       in_section = in_ctors;                                           \
        !           175:     }                                                                  \
        !           176: }
        !           177: 
        !           178: #define DTORS_SECTION_FUNCTION                                         \
        !           179: void                                                                   \
        !           180: dtors_section ()                                                       \
        !           181: {                                                                      \
        !           182:   if (in_section != in_dtors)                                          \
        !           183:     {                                                                  \
        !           184:       fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);            \
        !           185:       in_section = in_dtors;                                           \
        !           186:     }                                                                  \
        !           187: }
        !           188: 
        !           189: #if 0
        !           190: 
        !           191: /* A C statement (sans semicolon) to output an element in the table of
        !           192:    global constructors.  */
        !           193: #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                              \
        !           194:   do {                                                                 \
        !           195:     ctors_section ();                                                  \
        !           196:     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                             \
        !           197:     assemble_name (FILE, NAME);                                                \
        !           198:     fprintf (FILE, "\n");                                              \
        !           199:   } while (0)
        !           200: 
        !           201: /* A C statement (sans semicolon) to output an element in the table of
        !           202:    global destructors.  */
        !           203: #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                                       \
        !           204:   do {                                                                 \
        !           205:     dtors_section ();                                                  \
        !           206:     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                             \
        !           207:     assemble_name (FILE, NAME);                                        \
        !           208:     fprintf (FILE, "\n");                                              \
        !           209:   } while (0)
        !           210: 
        !           211: #endif
        !           212: 
        !           213: /* Stuff for constructors.  End here.  */
        !           214: 
        !           215: /* ??? Perhaps just include svr4.h in this file?  */
        !           216: 
        !           217: /* ??? SGI assembler may core dump when compiling with -g.
        !           218:    Sometimes as succeeds, but then we get a linker error. (cmds.c in 072.sc)
        !           219:    Getting rid of .file solves both problems.  */
        !           220: #undef ASM_OUTPUT_FILENAME
        !           221: #define ASM_OUTPUT_FILENAME(STREAM, NUM_SOURCE_FILENAMES, NAME) \
        !           222: do                                                             \
        !           223:   {                                                            \
        !           224:     fprintf (STREAM, "\t#.file\t%d ", NUM_SOURCE_FILENAMES);   \
        !           225:     output_quoted_string (STREAM, NAME);                       \
        !           226:     fputs ("\n", STREAM);                                      \
        !           227:   }                                                            \
        !           228: while (0)
        !           229: 
        !           230: /* ??? SGI assembler gives warning whenever .lcomm is used.  */
        !           231: #undef ASM_OUTPUT_LOCAL
        !           232: #define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN)    \
        !           233: do                                                             \
        !           234:   {                                                            \
        !           235:     if (mips_isa >= 3)                                         \
        !           236:       {                                                                \
        !           237:        fputs ("\t.section\t.bss\n", STREAM);                   \
        !           238:        ASM_DECLARE_OBJECT_NAME (STREAM, NAME, 0);              \
        !           239:        ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT));  \
        !           240:        ASM_OUTPUT_SKIP (STREAM, SIZE);                         \
        !           241:        fprintf (STREAM, "\t%s\n", POPSECTION_ASM_OP);          \
        !           242:       }                                                                \
        !           243:     else                                                       \
        !           244:       mips_declare_object (STREAM, NAME, "\n\t.lcomm\t", ",%u\n", (SIZE)); \
        !           245:   }                                                            \
        !           246: while (0)
        !           247: 
        !           248: #undef ASM_OUTPUT_INTERNAL_LABEL
        !           249: #define ASM_OUTPUT_INTERNAL_LABEL(STREAM,PREFIX,NUM)                   \
        !           250:   fprintf (STREAM, ".%s%d:\n", PREFIX, NUM)
        !           251: 
        !           252: /* This is how to store into the string LABEL
        !           253:    the symbol_ref name of an internal numbered label where
        !           254:    PREFIX is the class of label and NUM is the number within the class.
        !           255:    This is suitable for output with `assemble_name'.  */
        !           256: 
        !           257: #undef ASM_GENERATE_INTERNAL_LABEL
        !           258: #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)                  \
        !           259:   sprintf (LABEL, "*.%s%d", PREFIX, NUM)
        !           260: 
        !           261: #undef STARTFILE_SPEC
        !           262: /* Profiling is supported via libprof1.a not -lc_p as in Irix 3.  */
        !           263: #undef STARTFILE_SPEC
        !           264: #define STARTFILE_SPEC \
        !           265:   "%{mips1:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
        !           266:    %{mips2:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
        !           267:    %{!mips1:%{!mips2:%{pg:/usr/lib64/gcrt1.o}%{!pg:%{p:/usr/lib64/mcrt1.o /usr/lib64/libprof1.a}%{!p:/usr/lib64/crt1.o}}}}"
        !           268: 
        !           269: #undef LIB_SPEC
        !           270: #define LIB_SPEC "%{p:libprof1.a%s}%{pg:libprof1.a%s} -lc"
        !           271: 
        !           272: #undef ENDFILE_SPEC
        !           273: #define ENDFILE_SPEC \
        !           274:   "%{mips1:crtn.o%s}%{mips2:crtn.o%s}%{!mips1:%{!mips2:/usr/lib64/crtn.o}}"
        !           275: 
        !           276: #undef LINK_SPEC
        !           277: #define LINK_SPEC "\
        !           278: %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
        !           279: %{bestGnum} %{shared} %{non_shared} \
        !           280: %{call_shared} %{no_archive} %{exact_version} \
        !           281: %{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}} \
        !           282: -_SYSTYPE_SVR4"
        !           283: 
        !           284: /* ??? Debugging does not work.  We get many assembler core dumps,
        !           285:    and even some linker core dumps.  */
        !           286: #undef DBX_DEBUGGING_INFO
        !           287: #undef SDB_DEBUGGING_INFO
        !           288: #undef MIPS_DEBUGGING_INFO
        !           289: #undef DWARF_DEBUGGING_INFO
        !           290: #undef PREFERRED_DEBUGGING_TYPE

unix.superglobalmegacorp.com

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