]>
gcc.gnu.org Git - gcc.git/blob - gcc/config/rs6000/netware.h
1 /* Core target definitions for GNU compiler
2 for IBM RS/6000 PowerPC running NetWare
3 Copyright (C) 1994, 1995, 1996, 1998 Free Software Foundation, Inc.
4 Contributed by Cygnus Support.
6 This file is part of GNU CC.
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)
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.
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, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
25 #define CPP_DEFAULT_SPEC "-D_ARCH_PPC"
27 #define ASM_DEFAULT_SPEC "-mppc"
29 #include "rs6000/rs6000.h"
32 #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
34 #undef PROCESSOR_DEFAULT
35 #define PROCESSOR_DEFAULT PROCESSOR_PPC601
37 /* Don't generate XCOFF debugging information. */
39 #undef XCOFF_DEBUGGING_INFO
41 /* Don't use the COFF object file format. */
43 #undef OBJECT_FORMAT_COFF
45 /* The XCOFF support uses weird symbol suffixes, which we don't want
48 #undef STRIP_NAME_ENCODING
50 /* Don't bother to output .extern pseudo-ops. They are not needed by
53 #undef ASM_OUTPUT_EXTERNAL
55 /* Undefine some things which are defined by the generic svr4.h. */
58 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
59 #undef READONLY_DATA_SECTION
61 #undef ASM_DECLARE_FUNCTION_NAME
63 /* Use the regular svr4 definitions. */
68 /* Create a function descriptor when we declare a function name. This
69 is a mixture of the ASM_DECLARE_FUNCTION_NAME macros in rs6000.h
70 and svr4.h. The unmodified function name is used to name the
71 descriptor. The function name with an initial `.' is used to name
74 #undef ASM_DECLARE_FUNCTION_NAME
75 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
77 fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
78 assemble_name (FILE, NAME); \
80 fprintf (FILE, TYPE_OPERAND_FMT, "function"); \
82 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
83 if (TREE_PUBLIC (DECL)) \
85 fprintf (FILE, "\t.globl ."); \
86 assemble_name (FILE, NAME); \
87 fprintf (FILE, "\n"); \
90 ASM_OUTPUT_ALIGN (FILE, 2); \
91 ASM_OUTPUT_LABEL (FILE, NAME); \
92 fprintf (FILE, "\t.long ."); \
93 assemble_name (FILE, NAME); \
94 fprintf (FILE, ", __GOT0, 0\n"); \
96 fprintf (FILE, "."); \
97 ASM_OUTPUT_LABEL (FILE, NAME); \
100 /* We need to override the .size output in order to put a `.' before
101 the function name. */
103 #undef ASM_DECLARE_FUNCTION_SIZE
104 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
106 if (!flag_inhibit_size_directive) \
109 static int labelno; \
111 ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
112 ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
113 fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
114 assemble_name (FILE, (FNAME)); \
115 fprintf (FILE, ","); \
116 assemble_name (FILE, label); \
117 fprintf (FILE, "-."); \
118 assemble_name (FILE, (FNAME)); \
123 /* Use ELF style section commands. */
125 #undef TEXT_SECTION_ASM_OP
126 #define TEXT_SECTION_ASM_OP "\t.section\t\".text\""
128 #undef DATA_SECTION_ASM_OP
129 #define DATA_SECTION_ASM_OP "\t.section\t\".data\""
131 /* Besides the usual ELF sections, we need a toc section. */
133 #undef EXTRA_SECTIONS
134 #define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_toc
136 #undef EXTRA_SECTION_FUNCTIONS
137 #define EXTRA_SECTION_FUNCTIONS \
138 CONST_SECTION_FUNCTION \
139 CTORS_SECTION_FUNCTION \
140 DTORS_SECTION_FUNCTION \
143 #define TOC_SECTION_FUNCTION \
147 if (TARGET_MINIMAL_TOC) \
149 static int toc_initialized = 0; \
151 if (! toc_initialized) \
153 fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); \
154 fprintf (asm_out_file, ".LCTOC0:\n"); \
155 fprintf (asm_out_file, "\t.tc .LCTOC1\n"); \
156 fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \
157 fprintf (asm_out_file, ".LCTOC1:\n"); \
158 toc_initialized = 1; \
162 if (in_section != in_toc) \
164 fprintf (asm_out_file, "%s\n", \
165 (TARGET_MINIMAL_TOC \
166 ? MINIMAL_TOC_SECTION_ASM_OP \
167 : TOC_SECTION_ASM_OP)); \
168 in_section = in_toc; \
172 #define TOC_SECTION_ASM_OP "\t.section\t.got,\"aw\""
173 #define MINIMAL_TOC_SECTION_ASM_OP "\t.section\t.got1,\"aw\""
175 /* Use the TOC section for TOC entries. */
177 #undef SELECT_RTX_SECTION
178 #define SELECT_RTX_SECTION(MODE, X) \
179 { if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (X)) \
185 /* How to renumber registers for dbx and gdb. */
187 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
189 /* svr4.h overrides ASM_OUTPUT_INTERNAL_LABEL. */
191 #undef ASM_OUTPUT_INTERNAL_LABEL_PREFIX
192 #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
193 fprintf (FILE, ".%s", PREFIX)
196 #define ASM_SPEC "-u %(asm_cpu) \
197 {v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
198 /* This is the end of what might become sysv4.h. */
200 /* Enable output of DBX (stabs) debugging information when asked for it. */
202 #define DBX_DEBUGGING_INFO
204 /* Prefer DBX (stabs) debugging information over the native (DWARF) format. */
206 #undef PREFERRED_DEBUGGING_TYPE
207 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
209 /* Line numbers are relative to the current function. */
211 #undef ASM_OUTPUT_SOURCE_LINE
212 #define ASM_OUTPUT_SOURCE_LINE(file, line) \
213 { static int sym_lineno = 1; \
214 fprintf (file, ".stabn 68,0,%d,.LM%d-.%s\n.LM%d:\n",\
216 XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0), \
220 /* But, to make this work, we have to output the stabs for the function
223 #define DBX_FUNCTION_FIRST
225 /* We need to output LBRAC and RBRAC lines specially to include the
226 dot in from of the text symbol for a function. */
228 #define DBX_OUTPUT_LBRAC(FILE, BUF) \
231 fprintf (FILE, "%s %d,0,0,", ASM_STABN_OP, N_LBRAC); \
232 assemble_name (FILE, BUF); \
233 fprintf (FILE, "-."); \
234 assemble_name (asmfile, \
235 XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
236 fprintf (asmfile, "\n"); \
240 #define DBX_OUTPUT_RBRAC(FILE, BUF) \
243 fprintf (FILE, "%s %d,0,0,", ASM_STABN_OP, N_RBRAC); \
244 assemble_name (FILE, BUF); \
245 fprintf (FILE, "-."); \
246 assemble_name (asmfile, \
247 XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
248 fprintf (asmfile, "\n"); \
252 /* We are using function descriptors, so the value of a function
253 symbol is in the .data section. However, we want the stabs entry
254 for that function to point at the actual function code in the .text
255 section, which we get by prefixing the symbol with a dot. */
257 #define DBX_FINISH_SYMBOL(sym) \
260 if (use_gnu_debug_info_extensions && sym != 0) \
261 line = DECL_SOURCE_LINE (sym); \
263 fprintf (asmfile, "\",%d,0,%d,", current_sym_code, line); \
264 if (current_sym_addr) \
266 if (TREE_CODE (sym) == FUNCTION_DECL) \
267 fprintf (asmfile, "."); \
268 output_addr_const (asmfile, current_sym_addr); \
271 fprintf (asmfile, "%d", current_sym_value); \
272 putc ('\n', asmfile); \
275 /* This is the end of what might become sysv4dbx.h. */
277 #undef TARGET_VERSION
278 #define TARGET_VERSION fprintf (stderr, " (PowerPC Netware)");
280 /* FIXME: These should actually indicate PowerPC, when there is some
281 standard way of expressing that. */
282 #undef CPP_PREDEFINES
283 #define CPP_PREDEFINES \
284 "-DPPC D__netware__ -Asystem(netware) -Acpu(powerpc) -Amachine(powerpc)"
This page took 0.048925 seconds and 5 git commands to generate.