Initial revision
[official-gcc.git] / gcc / config / m68k / auxas.h
blob79a242068a5fb722c84e7e6a4f05715a390c0794
1 /* Definitions for Motorola 680x0 running A/UX using /bin/as
2 Copyright (C) 1996 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 #define USE_BIN_AS
23 #ifndef USE_COLLECT2
24 #define USE_COLLECT2
25 #endif
27 #ifndef __ASSEMBLY__
29 #include "m68k/sgs.h"
31 #define ASM_SPEC "%{m68030:-68030 }%{m68040:-68040 }"
33 /* Modify AT&T SGS assembler syntax */
34 /* A/UX's as doesn't do dots in pseodo-ops */
36 #define SDB_DEBUGGING_INFO
38 #define NO_DOLLAR_IN_LABEL
39 #define NO_DOT_IN_LABEL
41 #undef TEXT_SECTION_ASM_OP
42 #define TEXT_SECTION_ASM_OP "\ttext"
44 #undef DATA_SECTION_ASM_OP
45 #define DATA_SECTION_ASM_OP "\tdata\t1"
47 #undef BYTE_ASM_OP
48 #define BYTE_ASM_OP "byte"
50 #undef WORD_ASM_OP
51 #define WORD_ASM_OP "short"
53 #undef LONG_ASM_OP
54 #define LONG_ASM_OP "long"
56 #undef SPACE_ASM_OP
57 #define SPACE_ASM_OP "space"
59 #undef ALIGN_ASM_OP
60 #define ALIGN_ASM_OP "align"
62 #undef GLOBAL_ASM_OP
63 #define GLOBAL_ASM_OP "\tglobal"
65 #undef SWBEG_ASM_OP
66 #define SWBEG_ASM_OP "swbeg"
68 #undef SET_ASM_OP
69 #define SET_ASM_OP "set"
71 #undef ASM_PN_FORMAT
72 #define ASM_PN_FORMAT "%s%%%d"
74 #undef LOCAL_LABEL_PREFIX
75 #define LOCAL_LABEL_PREFIX "L%"
77 #define ADDITIONAL_REGISTER_NAMES { "%a6", 14, "%a7", 15 }
79 #undef ASM_OUTPUT_INT
80 #define ASM_OUTPUT_INT(FILE,VALUE) \
81 ( fprintf ((FILE), "\t%s ", LONG_ASM_OP), \
82 output_addr_const ((FILE), (VALUE)), \
83 fprintf ((FILE), "\n"))
85 #undef ASM_OUTPUT_COMMON
86 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
87 ( fputs ("\tcomm\t", (FILE)), \
88 assemble_name ((FILE), (NAME)), \
89 fprintf ((FILE), ",%u\n", (ROUNDED)))
91 #undef ASM_OUTPUT_LOCAL
92 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
93 ( fputs ("\tlcomm\t", (FILE)), \
94 assemble_name ((FILE), (NAME)), \
95 fprintf ((FILE), ",%u\n", (ROUNDED)))
97 #undef ASM_FILE_START
98 #define ASM_FILE_START(FILE) \
99 output_file_directive ((FILE), main_input_filename)
101 #undef ASM_OUTPUT_SOURCE_FILENAME
102 #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) \
103 ( fputs ("\tfile\t", (FILE)), \
104 output_quoted_string ((FILE), (NAME)), \
105 fputc ('\n', (FILE)) )
107 #undef ASM_OUTPUT_CASE_FETCH
108 #define ASM_OUTPUT_CASE_FETCH(file, labelno, regname) \
109 asm_fprintf (file, "10(%Rpc,%s.", regname)
111 #define SGS_NO_LI
113 /* Random macros describing parts of SDB data. */
115 #define PUT_SDB_SCL(a) \
116 fprintf(asm_out_file, "\tscl\t%d%s", (a), SDB_DELIM)
118 #define PUT_SDB_INT_VAL(a) \
119 fprintf (asm_out_file, "\tval\t%d%s", (a), SDB_DELIM)
121 #define PUT_SDB_VAL(a) \
122 ( fputs ("\tval\t", asm_out_file), \
123 output_addr_const (asm_out_file, (a)), \
124 fprintf (asm_out_file, SDB_DELIM))
126 #define PUT_SDB_DEF(a) \
127 do { fprintf (asm_out_file, "\tdef\t"); \
128 ASM_OUTPUT_LABELREF (asm_out_file, a); \
129 fprintf (asm_out_file, SDB_DELIM); } while (0)
131 #define PUT_SDB_PLAIN_DEF(a) fprintf(asm_out_file,"\tdef\t~%s%s", a, SDB_DELIM)
133 #define PUT_SDB_ENDEF fputs("\tendef\n", asm_out_file)
135 #define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\ttype\t0%o%s", a, SDB_DELIM)
137 #define PUT_SDB_SIZE(a) fprintf(asm_out_file, "\tsize\t%d%s", a, SDB_DELIM)
139 #define PUT_SDB_START_DIM fprintf(asm_out_file, "\tdim\t")
141 #define PUT_SDB_NEXT_DIM(a) fprintf(asm_out_file, "%d,", a)
143 #define PUT_SDB_LAST_DIM(a) fprintf(asm_out_file, "%d%s", a, SDB_DELIM)
145 #define PUT_SDB_TAG(a) \
146 do { fprintf (asm_out_file, "\ttag\t"); \
147 ASM_OUTPUT_LABELREF (asm_out_file, a); \
148 fprintf (asm_out_file, SDB_DELIM); } while (0)
150 #define PUT_SDB_BLOCK_START(LINE) \
151 fprintf (asm_out_file, \
152 "\tdef\t~bb%s\tval\t~%s\tscl\t100%s\tline\t%d%s\tendef\n", \
153 SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
155 #define PUT_SDB_BLOCK_END(LINE) \
156 fprintf (asm_out_file, \
157 "\tdef\t~eb%s\tval\t~%s\tscl\t100%s\tline\t%d%s\tendef\n", \
158 SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
160 #define PUT_SDB_FUNCTION_START(LINE) \
161 fprintf (asm_out_file, \
162 "\tdef\t~bf%s\tval\t~%s\tscl\t101%s\tline\t%d%s\tendef\n", \
163 SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
165 #define PUT_SDB_FUNCTION_END(LINE) \
166 fprintf (asm_out_file, \
167 "\tdef\t~ef%s\tval\t~%s\tscl\t101%s\tline\t%d%s\tendef\n", \
168 SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
170 #define PUT_SDB_EPILOGUE_END(NAME) \
171 do { fprintf (asm_out_file, "\tdef\t"); \
172 ASM_OUTPUT_LABELREF (asm_out_file, NAME); \
173 fprintf (asm_out_file, \
174 "%s\tval\t~%s\tscl\t-1%s\tendef\n", \
175 SDB_DELIM, SDB_DELIM, SDB_DELIM); } while (0)
177 #define SDB_GENERATE_FAKE(BUFFER, NUMBER) \
178 sprintf ((BUFFER), "~%dfake", (NUMBER));
180 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
181 fprintf((FILE), "\tln\t%d\n", \
182 (sdb_begin_function_line > 1 ? \
183 last_linenum - sdb_begin_function_line : 1))
185 #define ASM_MOV_INSN "mov.l"
187 #define FUNCTION_PROFILER_SYMBOL "mcount%"
189 #endif /* !__ASSEMBLY__ */