|
|
1.1 ! root 1: /* Definitions of target machine for GNU compiler. ! 2: ! 3: Citicorp/TTI Unicom PBD version ! 4: (using GAS and COFF (encapsulated is unacceptable) ) ! 5: ! 6: Copyright (C) 1990 Free Software Foundation, Inc. ! 7: ! 8: This file is part of GNU CC. ! 9: ! 10: GNU CC is free software; you can redistribute it and/or modify ! 11: it under the terms of the GNU General Public License as published by ! 12: the Free Software Foundation; either version 2, or (at your option) ! 13: any later version. ! 14: ! 15: GNU CC is distributed in the hope that it will be useful, ! 16: but WITHOUT ANY WARRANTY; without even the implied warranty of ! 17: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! 18: GNU General Public License for more details. ! 19: ! 20: You should have received a copy of the GNU General Public License ! 21: along with GNU CC; see the file COPYING. If not, write to ! 22: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ! 23: ! 24: #include "sparc.h" ! 25: ! 26: /* Names to predefine in the preprocessor for this target machine. */ ! 27: ! 28: #undef CPP_PREDEFINES ! 29: #define CPP_PREDEFINES "-Dsparc -DUnicomPBD -Dunix" ! 30: ! 31: /* We want DBX format for use with gdb under COFF. */ ! 32: ! 33: #define DBX_DEBUGGING_INFO ! 34: #define DBX_IN_COFF ! 35: ! 36: /* Generate calls to memcpy, memcmp and memset. */ ! 37: ! 38: #define TARGET_MEM_FUNCTIONS ! 39: ! 40: /* we use /lib/libp/lib* when profiling */ ! 41: ! 42: #undef LIB_SPEC ! 43: #define LIB_SPEC "%{!shlib:%{p:-L/lib/libp} %{pg:-L/lib/libp} -lc} \ ! 44: %{shlib:-lc_s crtn.o%s }" ! 45: ! 46: /* shared libraries need to use crt1.o */ ! 47: ! 48: #ifdef USE_GPLUS_IFILE ! 49: #define STARTFILE_SPEC \ ! 50: "g++.ifile%s %{!shlib:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\ ! 51: %{shlib:crt1.o%s } " ! 52: #else ! 53: #define STARTFILE_SPEC \ ! 54: "%{!shlib:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\ ! 55: %{shlib:crt1.o%s } " ! 56: #endif ! 57: ! 58: /* cpp has to support a #sccs directive for the /usr/include files */ ! 59: ! 60: #define SCCS_DIRECTIVE ! 61: ! 62: #ifndef __GNUC__ ! 63: #define USE_C_ALLOCA ! 64: #endif ! 65: ! 66: ! 67: #undef ASM_OUTPUT_LABELREF ! 68: #define ASM_OUTPUT_LABELREF(FILE,NAME) \ ! 69: fprintf (FILE, "%s", NAME) ! 70: ! 71: /* fixes: */ ! 72: /* ! 73: * Internal labels are prefixed with a period. ! 74: */ ! 75: ! 76: /* This is how to store into the string LABEL ! 77: the symbol_ref name of an internal numbered label where ! 78: PREFIX is the class of label and NUM is the number within the class. ! 79: This is suitable for output with `assemble_name'. */ ! 80: ! 81: #undef ASM_GENERATE_INTERNAL_LABEL ! 82: ! 83: #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ ! 84: sprintf (LABEL, "*.%s%d", PREFIX, NUM) ! 85: ! 86: ! 87: /* This is how to output an internal numbered label where ! 88: PREFIX is the class of label and NUM is the number within the class. */ ! 89: ! 90: #undef ASM_OUTPUT_INTERNAL_LABEL ! 91: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ ! 92: fprintf (FILE, ".%s%d:\n", PREFIX, NUM) ! 93: ! 94: /* This is how to output an element of a case-vector that is relative. */ ! 95: ! 96: #undef ASM_OUTPUT_ADDR_DIFF_ELT ! 97: #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ ! 98: fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL) ! 99: ! 100: /* This is how to output an element of a case-vector that is absolute. ! 101: (The 68000 does not use such vectors, ! 102: but we must define this macro anyway.) */ ! 103: ! 104: #undef ASM_OUTPUT_ADDR_VEC_ELT ! 105: #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! 106: fprintf (FILE, "\t.word .L%d\n", VALUE) ! 107: ! 108: /* Underscores are not used on Unicom PBB coff systems. */ ! 109: #define NO_UNDERSCORES ! 110: ! 111: /* Output assembler code to FILE to increment profiler label # LABELNO ! 112: for profiling a function entry. */ ! 113: ! 114: #undef FUNCTION_PROFILER ! 115: #define FUNCTION_PROFILER(FILE, LABELNO) \ ! 116: fprintf (FILE, "\tsethi %%hi(.LP%d),%%o0\n\tcall mcount\n\tor %%lo(.LP%d),%%o0,%%o0\n", \ ! 117: (LABELNO), (LABELNO)) ! 118: ! 119: /* Output assembler code to FILE to initialize this source file's ! 120: basic block profiling info, if that has not already been done. */ ! 121: ! 122: #undef FUNCTION_BLOCK_PROFILER ! 123: #define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \ ! 124: fprintf (FILE, "\tsethi %%hi(.LPBX0),%%o0\n\tld [%%lo(.LPBX0)+%%o0],%%o1\n\ttst %%o1\n\tbne .LPY%d\n\tnop\n\tcall ___bb_init_func\n\tnop\n.LPY%d:\n", \ ! 125: (LABELNO), (LABELNO)) ! 126: ! 127: /* Output assembler code to FILE to increment the entry-count for ! 128: the BLOCKNO'th basic block in this source file. */ ! 129: ! 130: #undef BLOCK_PROFILER ! 131: #define BLOCK_PROFILER(FILE, BLOCKNO) \ ! 132: { \ ! 133: int blockn = (BLOCKNO); \ ! 134: fprintf (FILE, "\tsethi %%hi(.LPBX2+%d),%%g1\n\tld [%%lo(.LPBX2+%d)+%%g1],%%g2\n\ ! 135: \tadd %%g2,1,%%g2\n\tst %%g2,[%%lo(.LPBX2+%d)+%%g1]\n", \ ! 136: 4 * blockn, 4 * blockn, 4 * blockn); \ ! 137: CC_STATUS_INIT; /* We have clobbered %g1. Also %g2. */ \ ! 138: } ! 139: /* This is needed for SunOS 4.0, and should not hurt for 3.2 ! 140: versions either. */ ! 141: #undef ASM_OUTPUT_SOURCE_LINE(file, line) ! 142: #define ASM_OUTPUT_SOURCE_LINE(file, line) \ ! 143: { static int sym_lineno = 1; \ ! 144: fprintf (file, ".stabn 68,0,%d,.LM%d\n.LM%d:\n", \ ! 145: line, sym_lineno, sym_lineno); \ ! 146: sym_lineno += 1; } ! 147: ! 148: #define ASM_INT_OP ".long "
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.