Annotation of gcc/config/i860v3.h, revision 1.1

1.1     ! root        1: /* Target definitions for GNU compiler for Intel 80860 running System V.3
        !             2:    Copyright (C) 1991 Free Software Foundation, Inc.
        !             3: 
        !             4:    Written by Ron Guilmette ([email protected]).
        !             5: 
        !             6: This file is part of GNU CC.
        !             7: 
        !             8: GNU CC is free software; you can redistribute it and/or modify
        !             9: it under the terms of the GNU General Public License as published by
        !            10: the Free Software Foundation; either version 2, or (at your option)
        !            11: any later version.
        !            12: 
        !            13: GNU CC is distributed in the hope that it will be useful,
        !            14: but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            15: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !            16: GNU General Public License for more details.
        !            17: 
        !            18: You should have received a copy of the GNU General Public License
        !            19: along with GNU CC; see the file COPYING.  If not, write to
        !            20: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
        !            21: 
        !            22: #include "i860.h"
        !            23: #include "svr3.h"
        !            24: 
        !            25: /* Provide a set of pre-definitions and pre-assertions appropriate for
        !            26:    the i860 running svr3.  */
        !            27: #define CPP_PREDEFINES "-Di860 -Dunix -DSVR3"
        !            28: 
        !            29: /* Use crt1.o as a startup file and crtn.o as a closing file.  */
        !            30: 
        !            31: #define STARTFILE_SPEC  \
        !            32:   "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
        !            33: 
        !            34: #define LIB_SPEC "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} -lc crtn.o%s"
        !            35: 
        !            36: /* Special flags for the linker.  I don't know what they do.  */
        !            37: 
        !            38: #define LINK_SPEC "%{T*} %{z:-lm}"
        !            39: 
        !            40: /* The prefix to be used in assembler output for all names of registers.
        !            41:    None is needed in V.3.  */
        !            42: 
        !            43: #define I860_REG_PREFIX        ""
        !            44: 
        !            45: /* Delimiter that starts comments in the assembler code.  */
        !            46: 
        !            47: #define ASM_COMMENT_START "//"
        !            48: 
        !            49: /* Don't renumber the regusters for debugger output.  */
        !            50: 
        !            51: #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
        !            52: 
        !            53: /* Output the special word the System V SDB wants to see just before
        !            54:    the first word of each function's prologue code.  */
        !            55: 
        !            56: extern char *current_function_original_name;
        !            57: 
        !            58: /* This special macro is used to output a magic word just before the
        !            59:    first word of each function.  On some versions of UNIX running on
        !            60:    the i860, this word can be any word that looks like a NOP, however
        !            61:    under svr4, this neds to be an `shr r0,r0,r0' instruction in which
        !            62:    the normally unused low-order bits contain the length of the function
        !            63:    prologue code (in bytes).  This is needed to make the System V SDB
        !            64:    debugger happy.  */
        !            65: 
        !            66: #undef ASM_OUTPUT_FUNCTION_PREFIX
        !            67: #define ASM_OUTPUT_FUNCTION_PREFIX(FILE, FNNAME)                       \
        !            68:   do { ASM_OUTPUT_ALIGN (FILE, 2);                                     \
        !            69:        fprintf ((FILE), "\t.long\t.ep.");                              \
        !            70:        assemble_name (FILE, FNNAME);                                   \
        !            71:        fprintf (FILE, "-");                                            \
        !            72:        assemble_name (FILE, FNNAME);                                   \
        !            73:        fprintf (FILE, "+0xc8000000\n");                                \
        !            74:        current_function_original_name = (FNNAME);                      \
        !            75:   } while (0)
        !            76: 
        !            77: /* Output the special label that must go just after each function's
        !            78:    prologue code to support svr4 SDB.  */
        !            79: 
        !            80: #define ASM_OUTPUT_PROLOGUE_SUFFIX(FILE)                               \
        !            81:   do { fprintf (FILE, ".ep.");                                         \
        !            82:        assemble_name (FILE, current_function_original_name);           \
        !            83:        fprintf (FILE, ":\n");                                          \
        !            84:   } while (0)
        !            85: 
        !            86: /* The routine used to output string literals.
        !            87: 
        !            88: #define ASCII_DATA_ASM_OP      ".byte"
        !            89: 
        !            90: #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH)                            \
        !            91:   do                                                                   \
        !            92:     {                                                                  \
        !            93:       register unsigned char *str = (unsigned char *) (STR);           \
        !            94:       register unsigned char *limit = str + (LENGTH);                  \
        !            95:       register unsigned bytes_in_chunk = 0;                            \
        !            96:       for (; str < limit; str++)                                       \
        !            97:         {                                                              \
        !            98:           register unsigned ch = *str;                                 \
        !            99:           if (ch < 32 || ch == '\\' || ch == '"' || ch >= 127)         \
        !           100:            {                                                           \
        !           101:              if (bytes_in_chunk > 0)                                   \
        !           102:                {                                                       \
        !           103:                  fprintf ((FILE), "\"\n");                             \
        !           104:                  bytes_in_chunk = 0;                                   \
        !           105:                }                                                       \
        !           106:              fprintf ((FILE), "%s\t%d\n", ASM_BYTE_OP, ch);            \
        !           107:            }                                                           \
        !           108:           else                                                         \
        !           109:            {                                                           \
        !           110:              if (bytes_in_chunk >= 60)                                 \
        !           111:                {                                                       \
        !           112:                  fprintf ((FILE), "\"\n");                             \
        !           113:                  bytes_in_chunk = 0;                                   \
        !           114:                }                                                       \
        !           115:              if (bytes_in_chunk == 0)                                  \
        !           116:                fprintf ((FILE), "\t%s\t\"", ASCII_DATA_ASM_OP);        \
        !           117:              putc (ch, (FILE));                                        \
        !           118:              bytes_in_chunk++;                                         \
        !           119:            }                                                           \
        !           120:         }                                                              \
        !           121:       if (bytes_in_chunk > 0)                                          \
        !           122:         fprintf ((FILE), "\"\n");                                      \
        !           123:     }                                                                  \
        !           124:   while (0)
        !           125: 
        !           126: 
        !           127: #undef CTORS_SECTION_ASM_OP
        !           128: #define CTORS_SECTION_ASM_OP   "\t.section\t.ctors,\"x\"\n"
        !           129: #undef DTORS_SECTION_ASM_OP
        !           130: #define DTORS_SECTION_ASM_OP   "\t.section\t.dtors,\"x\"\n"
        !           131: 
        !           132: /* Add definitions to support the .tdesc section as specified in the svr4
        !           133:    ABI for the i860.  */
        !           134: 
        !           135: #define TDESC_SECTION_ASM_OP    "\t.section\t.tdesc"
        !           136: 
        !           137: #undef EXTRA_SECTIONS
        !           138: #define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_tdesc
        !           139: 
        !           140: #undef EXTRA_SECTION_FUNCTIONS
        !           141: #define EXTRA_SECTION_FUNCTIONS                                                \
        !           142:   CONST_SECTION_FUNCTION                                               \
        !           143:   CTORS_SECTION_FUNCTION                                               \
        !           144:   DTORS_SECTION_FUNCTION                                               \
        !           145:   TDESC_SECTION_FUNCTION
        !           146: 
        !           147: #define TDESC_SECTION_FUNCTION                                         \
        !           148: void                                                                   \
        !           149: tdesc_section ()                                                       \
        !           150: {                                                                      \
        !           151:   if (in_section != in_tdesc)                                          \
        !           152:     {                                                                  \
        !           153:       fprintf (asm_out_file, "%s\n", TDESC_SECTION_ASM_OP);            \
        !           154:       in_section = in_tdesc;                                           \
        !           155:     }                                                                  \
        !           156: }
        !           157: 
        !           158: /* Enable the `const' section that svr3.h defines how to use.  */
        !           159: #define USE_CONST_SECTION      1

unix.superglobalmegacorp.com

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