1 /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU
2 running over UDI using COFF.
3 Copyright (C) 1994, 1996, 2000 Free Software Foundation, Inc.
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* Support the ctors and dtors sections for g++. */
24 #define CTORS_SECTION_ASM_OP "\t.use .ctors"
25 #define DTORS_SECTION_ASM_OP "\t.use .dtors"
27 /* A list of other sections which the compiler might be "in" at any
31 #define EXTRA_SECTIONS readonly_data, in_ctors, in_dtors
33 /* A list of extra section function definitions. */
35 #undef EXTRA_SECTION_FUNCTIONS
36 #define EXTRA_SECTION_FUNCTIONS \
37 READONLY_DATA_FUNCTION \
38 CTORS_SECTION_FUNCTION \
39 DTORS_SECTION_FUNCTION
41 #define READONLY_DATA_FUNCTION \
45 if (in_section != readonly_data) \
47 fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \
48 in_section = readonly_data; \
52 #define CTORS_SECTION_FUNCTION \
56 if (in_section != in_ctors) \
58 fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
59 in_section = in_ctors; \
63 #define DTORS_SECTION_FUNCTION \
67 if (in_section != in_dtors) \
69 fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
70 in_section = in_dtors; \
74 #define INT_ASM_OP "\t.word\t"
76 /* A C statement (sans semicolon) to output an element in the table of
77 global constructors. */
78 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
81 fprintf (FILE, "%s", INT_ASM_OP); \
82 assemble_name (FILE, NAME); \
83 fprintf (FILE, "\n"); \
86 /* A C statement (sans semicolon) to output an element in the table of
87 global destructors. */
88 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
91 fprintf (FILE, "%s", INT_ASM_OP); \
92 assemble_name (FILE, NAME); \
93 fprintf (FILE, "\n"); \