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

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: 
1.1.1.4 ! root       25: #undef TARGET_VERSION
        !            26: #define TARGET_VERSION fprintf (stderr, " (i860, System V Release 3)")
        !            27: 
1.1       root       28: /* Provide a set of pre-definitions and pre-assertions appropriate for
                     29:    the i860 running svr3.  */
1.1.1.4 ! root       30: #define CPP_PREDEFINES "-Di860 -Dunix -D__svr3__"
1.1       root       31: 
                     32: /* Use crt1.o as a startup file and crtn.o as a closing file.  */
                     33: 
                     34: #define STARTFILE_SPEC  \
                     35:   "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
                     36: 
                     37: #define LIB_SPEC "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} -lc crtn.o%s"
                     38: 
                     39: /* Special flags for the linker.  I don't know what they do.  */
                     40: 
                     41: #define LINK_SPEC "%{T*} %{z:-lm}"
                     42: 
                     43: /* The prefix to be used in assembler output for all names of registers.
                     44:    None is needed in V.3.  */
                     45: 
                     46: #define I860_REG_PREFIX        ""
                     47: 
                     48: /* Delimiter that starts comments in the assembler code.  */
                     49: 
                     50: #define ASM_COMMENT_START "//"
                     51: 
                     52: /* Don't renumber the regusters for debugger output.  */
                     53: 
                     54: #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
                     55: 
                     56: /* Output the special word the System V SDB wants to see just before
                     57:    the first word of each function's prologue code.  */
                     58: 
                     59: extern char *current_function_original_name;
                     60: 
                     61: /* This special macro is used to output a magic word just before the
                     62:    first word of each function.  On some versions of UNIX running on
                     63:    the i860, this word can be any word that looks like a NOP, however
                     64:    under svr4, this neds to be an `shr r0,r0,r0' instruction in which
                     65:    the normally unused low-order bits contain the length of the function
                     66:    prologue code (in bytes).  This is needed to make the System V SDB
                     67:    debugger happy.  */
                     68: 
                     69: #undef ASM_OUTPUT_FUNCTION_PREFIX
                     70: #define ASM_OUTPUT_FUNCTION_PREFIX(FILE, FNNAME)                       \
                     71:   do { ASM_OUTPUT_ALIGN (FILE, 2);                                     \
                     72:        fprintf ((FILE), "\t.long\t.ep.");                              \
                     73:        assemble_name (FILE, FNNAME);                                   \
                     74:        fprintf (FILE, "-");                                            \
                     75:        assemble_name (FILE, FNNAME);                                   \
                     76:        fprintf (FILE, "+0xc8000000\n");                                \
                     77:        current_function_original_name = (FNNAME);                      \
                     78:   } while (0)
                     79: 
                     80: /* Output the special label that must go just after each function's
                     81:    prologue code to support svr4 SDB.  */
                     82: 
                     83: #define ASM_OUTPUT_PROLOGUE_SUFFIX(FILE)                               \
                     84:   do { fprintf (FILE, ".ep.");                                         \
                     85:        assemble_name (FILE, current_function_original_name);           \
                     86:        fprintf (FILE, ":\n");                                          \
                     87:   } while (0)
                     88: 
                     89: /* The routine used to output string literals.
                     90: 
                     91: #define ASCII_DATA_ASM_OP      ".byte"
                     92: 
                     93: #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH)                            \
                     94:   do                                                                   \
                     95:     {                                                                  \
                     96:       register unsigned char *str = (unsigned char *) (STR);           \
                     97:       register unsigned char *limit = str + (LENGTH);                  \
                     98:       register unsigned bytes_in_chunk = 0;                            \
                     99:       for (; str < limit; str++)                                       \
                    100:         {                                                              \
                    101:           register unsigned ch = *str;                                 \
                    102:           if (ch < 32 || ch == '\\' || ch == '"' || ch >= 127)         \
                    103:            {                                                           \
                    104:              if (bytes_in_chunk > 0)                                   \
                    105:                {                                                       \
                    106:                  fprintf ((FILE), "\"\n");                             \
                    107:                  bytes_in_chunk = 0;                                   \
                    108:                }                                                       \
1.1.1.3   root      109:              fprintf ((FILE), "\t%s\t%d\n", ASM_BYTE_OP, ch);          \
1.1       root      110:            }                                                           \
                    111:           else                                                         \
                    112:            {                                                           \
                    113:              if (bytes_in_chunk >= 60)                                 \
                    114:                {                                                       \
                    115:                  fprintf ((FILE), "\"\n");                             \
                    116:                  bytes_in_chunk = 0;                                   \
                    117:                }                                                       \
                    118:              if (bytes_in_chunk == 0)                                  \
                    119:                fprintf ((FILE), "\t%s\t\"", ASCII_DATA_ASM_OP);        \
                    120:              putc (ch, (FILE));                                        \
                    121:              bytes_in_chunk++;                                         \
                    122:            }                                                           \
                    123:         }                                                              \
                    124:       if (bytes_in_chunk > 0)                                          \
                    125:         fprintf ((FILE), "\"\n");                                      \
                    126:     }                                                                  \
                    127:   while (0)
                    128: 
                    129: 
                    130: #undef CTORS_SECTION_ASM_OP
1.1.1.3   root      131: #define CTORS_SECTION_ASM_OP   ".section\t.ctors,\"x\""
1.1       root      132: #undef DTORS_SECTION_ASM_OP
1.1.1.3   root      133: #define DTORS_SECTION_ASM_OP   ".section\t.dtors,\"x\""
1.1       root      134: 
                    135: /* Add definitions to support the .tdesc section as specified in the svr4
                    136:    ABI for the i860.  */
                    137: 
1.1.1.2   root      138: #define TDESC_SECTION_ASM_OP    ".section\t.tdesc"
1.1       root      139: 
                    140: #undef EXTRA_SECTIONS
                    141: #define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_tdesc
                    142: 
                    143: #undef EXTRA_SECTION_FUNCTIONS
                    144: #define EXTRA_SECTION_FUNCTIONS                                                \
                    145:   CONST_SECTION_FUNCTION                                               \
                    146:   CTORS_SECTION_FUNCTION                                               \
                    147:   DTORS_SECTION_FUNCTION                                               \
                    148:   TDESC_SECTION_FUNCTION
                    149: 
                    150: #define TDESC_SECTION_FUNCTION                                         \
                    151: void                                                                   \
                    152: tdesc_section ()                                                       \
                    153: {                                                                      \
                    154:   if (in_section != in_tdesc)                                          \
                    155:     {                                                                  \
                    156:       fprintf (asm_out_file, "%s\n", TDESC_SECTION_ASM_OP);            \
                    157:       in_section = in_tdesc;                                           \
                    158:     }                                                                  \
                    159: }
                    160: 
                    161: /* Enable the `const' section that svr3.h defines how to use.  */
1.1.1.4 ! root      162: #undef USE_CONST_SECTION
1.1       root      163: #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.