* final.c (HAVE_READONLY_DATA_SECTION): New.
[official-gcc.git] / gcc / config / m68k / tower-as.h
blobcd457cd1d25bb645451474116d17117091448bd3
1 /* Definitions of target machine for GNU compiler.
2 For NCR Tower 32/4x0 and 32/6x0 running System V Release 3.
3 Copyright (C) 1990, 1993, 1994, 1996, 1997, 2000, 2002
4 Free Software Foundation, Inc.
5 Contributed by Robert Andersson (ra@intsys.no), International Systems,
6 Oslo, Norway.
8 This file is part of GNU CC.
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.
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.
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, 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */
26 /* This file outputs assembler source suitable for the native Tower as
27 and with sdb debugging symbols. See tower.h for more comments.
29 This file was based on m68k.h, hp320.h and 3b1.h as of the
30 1.37.1 version. */
32 #include "m68k/tower.h"
33 #undef SELECT_RTX_SECTION
35 /* Use default settings for system V.3. */
37 #include "svr3.h"
39 /* Names to predefine in the preprocessor for this target machine. */
41 #define CPP_PREDEFINES "-Dunix -Dtower32 -Dtower32_600 -D__motorola__ -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k"
43 /* Define __HAVE_68881 in preprocessor only if -m68881 is specified.
44 This will control the use of inline 68881 insns in certain macros.
45 Also, define special define used to identify the Tower assembler. */
47 #define CPP_SPEC "-D__TOWER_ASM__ %{m68881:-D__HAVE_68881__}"
49 /* We don't want local labels to start with period.
50 See ASM_OUTPUT_INTERNAL_LABEL. */
51 #undef LOCAL_LABEL_PREFIX
52 #define LOCAL_LABEL_PREFIX ""
54 /* The prefix to add to user-visible assembler symbols. */
55 /* We do not want leading underscores. */
57 #undef USER_LABEL_PREFIX
58 #define USER_LABEL_PREFIX ""
60 /* These four macros control how m68k.md is expanded. */
62 #define MOTOROLA /* Use Motorola syntax rather than "MIT" */
63 #define SGS /* Uses SGS assembler */
64 #define SGS_CMP_ORDER /* Takes cmp operands in reverse order */
65 #define SGS_NO_LI /* Suppress jump table label usage */
67 #undef INT_OP_GROUP
68 #define INT_OP_GROUP INT_OP_NO_DOT
70 /* Turn on SDB debugging info. */
72 #define SDB_DEBUGGING_INFO
74 /* All the ASM_OUTPUT macros need to conform to the Tower as syntax. */
76 #define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \
77 do { \
78 fprintf (FILE, "\tfile\t"); \
79 output_quoted_string (FILE, FILENAME); \
80 fprintf (FILE, "\n"); \
81 fprintf (FILE, "section ~init,\"x\"\n"); \
82 fprintf (FILE, "section ~fini,\"x\"\n"); \
83 fprintf (FILE, "section ~rodata,\"x\"\n"); \
84 fprintf (FILE, "text\n"); \
85 } while (0)
87 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO) \
88 fprintf (FILE, "\tln\t%d\n", \
89 (sdb_begin_function_line > -1 \
90 ? (LINENO) - sdb_begin_function_line : 1))
92 #undef ASM_OUTPUT_IDENT
93 #define ASM_OUTPUT_IDENT(FILE, NAME) \
94 fprintf (FILE, "\tident\t\"%s\" \n", NAME)
96 #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
97 do { register size_t sp = 0, lp = 0, limit = (LEN); \
98 fprintf ((FILE), "\tbyte\t"); \
99 loop: \
100 if ((PTR)[sp] > ' ' && ! ((PTR)[sp] & 0x80) && (PTR)[sp] != '\\') \
101 { lp += 3; \
102 fprintf ((FILE), "'%c", (PTR)[sp]); } \
103 else \
104 { lp += 5; \
105 fprintf ((FILE), "0x%x", (PTR)[sp]); } \
106 if (++sp < limit) \
107 { if (lp > 60) \
108 { lp = 0; \
109 fprintf ((FILE), "\n\tbyte\t"); } \
110 else \
111 putc (',', (FILE)); \
112 goto loop; } \
113 putc ('\n', (FILE)); } while (0)
115 /* Translate Motorola opcodes such as `jbeq'
116 into SGS/Tower opcodes such as `beq.w'.
117 Change `move' to `mov'.
118 Change `cmpm' to `cmp'.
119 Change `divsl' to `tdivs'.
120 Change `divul' to `tdivu'.
121 Change `ftst' to `ftest'.
122 Change `fmove' to `fmov'. */
124 #define ASM_OUTPUT_OPCODE(FILE, PTR) \
125 { if ((PTR)[0] == 'j' && (PTR)[1] == 'b') \
126 { ++(PTR); \
127 while (*(PTR) != ' ') \
128 { putc (*(PTR), (FILE)); ++(PTR); } \
129 fprintf ((FILE), ".w"); } \
130 else if ((PTR)[0] == 'm' && (PTR)[1] == 'o' \
131 && (PTR)[2] == 'v' && (PTR)[3] == 'e') \
132 { fprintf ((FILE), "mov"); (PTR) += 4; } \
133 else if ((PTR)[0] == 'c' && (PTR)[1] == 'm' \
134 && (PTR)[2] == 'p' && (PTR)[3] == 'm') \
135 { fprintf ((FILE), "cmp"); (PTR) += 4; } \
136 else if ((PTR)[0] == 'd' && (PTR)[1] == 'i' \
137 && (PTR)[2] == 'v' && (PTR)[3] == 's' \
138 && (PTR)[4] == 'l') \
139 { fprintf ((FILE), "tdivs"); (PTR) += 5; } \
140 else if ((PTR)[0] == 'd' && (PTR)[1] == 'i' \
141 && (PTR)[2] == 'v' && (PTR)[3] == 'u' \
142 && (PTR)[4] == 'l') \
143 { fprintf ((FILE), "tdivu"); (PTR) += 5; } \
144 else if ((PTR)[0] == 'f' && (PTR)[1] == 't' \
145 && (PTR)[2] == 's' && (PTR)[3] == 't') \
146 { fprintf ((FILE), "ftest"); (PTR) += 4; } \
147 else if ((PTR)[0] == 'f' && (PTR)[1] == 'm' \
148 && (PTR)[2] == 'o' && (PTR)[3] == 'v' \
149 && (PTR)[4] == 'e') \
150 { fprintf ((FILE), "fmov"); (PTR) += 5; } \
155 /* Override parts of m68k.h to fit the Tower assembler.
156 This section needs to track changes done to m68k.h in the future. */
158 #undef TARGET_VERSION
159 #define TARGET_VERSION fprintf (stderr, " (68k, Motorola/SGS/Tower32 syntax)");
161 #undef FUNCTION_BLOCK_PROFILER
162 #define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \
163 do { \
164 char label1[20], label2[20]; \
165 ASM_GENERATE_INTERNAL_LABEL (label1, "LPBX", 0); \
166 ASM_GENERATE_INTERNAL_LABEL (label2, "LPI", LABELNO); \
167 fprintf (FILE, "\ttst.l %s\n\tbne %s\n\tpea %s\n\tjsr __bb_init_func\n\taddq.l &4,%%sp\n", \
168 label1, label2, label1); \
169 ASM_OUTPUT_INTERNAL_LABEL (FILE, "LPI", LABELNO); \
170 putc ('\n', FILE); \
171 } while (0)
173 #undef BLOCK_PROFILER
174 #define BLOCK_PROFILER(FILE, BLOCKNO) \
175 do { \
176 char label[20]; \
177 ASM_GENERATE_INTERNAL_LABEL (label, "LPBX", 2); \
178 fprintf (FILE, "\taddq.l &1,%s+%d\n", label, 4 * BLOCKNO); \
179 } while (0)
181 #undef FUNCTION_PROFILER
182 #define FUNCTION_PROFILER(FILE, LABEL_NO) \
183 fprintf (FILE, "\tmov.l &LP%%%d,%%a0\n\tjsr mcount%%\n", (LABEL_NO))
185 #undef FUNCTION_EXTRA_EPILOGUE
186 #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \
187 { if (current_function_returns_pointer \
188 && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \
189 asm_fprintf (FILE, "\tmov.l %Rd0,%Ra0\n"); }
191 /* This is how to output an insn to push a register on the stack.
192 It need not be very fast code. */
194 #undef ASM_OUTPUT_REG_PUSH
195 #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
196 fprintf (FILE, "\tmov.l %s,-(%%sp)\n", reg_names[REGNO])
198 /* This is how to output an insn to pop a register from the stack.
199 It need not be very fast code. */
201 #undef ASM_OUTPUT_REG_POP
202 #define ASM_OUTPUT_REG_POP(FILE,REGNO) \
203 fprintf (FILE, "\tmov.l (%%sp)+,%s\n", reg_names[REGNO])
205 #undef ASM_FILE_START
206 #define ASM_FILE_START(FILE) \
207 ( fprintf (FILE, "#NO_APP\n"), \
208 output_file_directive ((FILE), main_input_filename))
210 #undef TEXT_SECTION_ASM_OP
211 #define TEXT_SECTION_ASM_OP "\ttext"
213 #undef DATA_SECTION_ASM_OP
214 #define DATA_SECTION_ASM_OP "\tdata"
216 /* This says how to output an assembler line to define a global common symbol.
217 We use SIZE rather than ROUNDED, as this is what the native cc does. */
219 #undef ASM_OUTPUT_COMMON
220 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
221 ( fputs ("\tcomm ", (FILE)), \
222 assemble_name ((FILE), (NAME)), \
223 fprintf ((FILE), ",%d\n", ((SIZE) == 0) ? (ROUNDED) : (SIZE)))
225 /* This says how to output an assembler line to define a local common symbol.
226 We use SIZE rather than ROUNDED, as this is what the native cc does. */
228 #undef ASM_OUTPUT_LOCAL
229 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
230 ( fputs ("\tlcomm ", (FILE)), \
231 assemble_name ((FILE), (NAME)), \
232 fprintf ((FILE), ",%d\n", ((SIZE) == 0) ? (ROUNDED) : (SIZE)))
234 /* Store in OUTPUT a string (made with alloca) containing
235 an assembler-name for a local static variable named NAME.
236 LABELNO is an integer which is different for each call. */
238 #undef ASM_FORMAT_PRIVATE_NAME
239 #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
240 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 11), \
241 sprintf ((OUTPUT), "%s%%%%%d", (NAME), (LABELNO)))
243 /* This is the command to make the user-level label named NAME
244 defined for reference from other files. */
246 #undef GLOBAL_ASM_OP
247 #define GLOBAL_ASM_OP "\tglobal\t"
249 #undef ASM_GENERATE_INTERNAL_LABEL
250 #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
251 sprintf ((LABEL), "%s%%%ld", (PREFIX), (long)(NUM))
253 #undef ASM_OUTPUT_INTERNAL_LABEL
254 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
255 fprintf ((FILE), "%s%%%d:\n", (PREFIX), (NUM))
257 #undef ASM_OUTPUT_CASE_LABEL
258 #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \
259 fprintf (FILE, "\tswbeg &%d\n%s%%%d:\n", \
260 XVECLEN (PATTERN (TABLE), 1), (PREFIX), (NUM)); \
262 #undef ASM_OUTPUT_ADDR_VEC_ELT
263 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
264 fprintf (FILE, "\tlong L%%%d\n", (VALUE))
266 #undef ASM_OUTPUT_ADDR_DIFF_ELT
267 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
268 fprintf (FILE, "\tshort L%%%d-L%%%d\n", (VALUE), (REL))
270 #undef ASM_OUTPUT_ALIGN
271 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
272 do { \
273 if ((LOG) == 1) \
274 fprintf (FILE, "\teven\n"); \
275 else if ((LOG) != 0) \
276 abort (); \
277 } while (0)
279 #undef ASM_OUTPUT_SKIP
280 #define ASM_OUTPUT_SKIP(FILE,SIZE) \
281 fprintf (FILE, "\tspace %d\n", (SIZE))
283 /* Output a float value (represented as a C double) as an immediate operand.
284 This macro is a 68k-specific macro. */
286 #undef ASM_OUTPUT_FLOAT_OPERAND
287 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
288 do { long l; \
289 REAL_VALUE_TO_TARGET_SINGLE (r, l); \
290 /* Use hex representation even if CODE is f. as needs it. */ \
291 fprintf ((FILE), "&0x%lx", l); \
292 } while (0)
294 /* Output a double value (represented as a C double) as an immediate operand.
295 This macro is a 68k-specific macro. */
296 #undef ASM_OUTPUT_DOUBLE_OPERAND
297 #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
298 do { long l[2]; \
299 REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
300 fprintf ((FILE), "&0x%lx%08lx", l[0], l[1]); \
301 } while (0)
303 #if 0
304 #undef PRINT_OPERAND
305 #define PRINT_OPERAND(FILE, X, CODE) \
306 { if (CODE == '.') fprintf (FILE, "."); \
307 else if (CODE == '#') fprintf (FILE, "&"); \
308 else if (CODE == '-') fprintf (FILE, "-(%%sp)"); \
309 else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \
310 else if (CODE == '@') fprintf (FILE, "(%%sp)"); \
311 else if (CODE == '!') fprintf (FILE, "%%fpcr"); \
312 else if (CODE == '/') \
313 fprintf (FILE, "%%"); \
314 else if (CODE == '$') { if (TARGET_68040_ONLY) fprintf (FILE, "s"); } \
315 else if (CODE == '&') { if (TARGET_68040_ONLY) fprintf (FILE, "d"); } \
316 else if (GET_CODE (X) == REG) \
317 fprintf (FILE, "%s", reg_names[REGNO (X)]); \
318 else if (GET_CODE (X) == MEM) \
319 output_address (XEXP (X, 0)); \
320 else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode) \
321 { REAL_VALUE_TYPE r; long l; \
322 REAL_VALUE_FROM_CONST_DOUBLE (r, X); \
323 REAL_VALUE_TO_TARGET_SINGLE (r, l); \
324 fprintf (FILE, "&0x%lx", l); } \
325 else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \
326 { REAL_VALUE_TYPE r; int i[2]; \
327 REAL_VALUE_FROM_CONST_DOUBLE (r, X); \
328 REAL_VALUE_TO_TARGET_DOUBLE (r, i); \
329 fprintf (FILE, "&0x%x%08x", i[0], i[1]); } \
330 else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == XFmode) \
331 { REAL_VALUE_TYPE r; \
332 REAL_VALUE_FROM_CONST_DOUBLE (r, X); \
333 ASM_OUTPUT_LONG_DOUBLE_OPERAND (FILE, r); } \
334 else { putc ('&', FILE); output_addr_const (FILE, X); }}
335 #endif
337 /* Note that this contains a kludge that knows that the only reason
338 we have an address (plus (label_ref...) (reg...))
339 is in the insn before a tablejump, and we know that the table is
340 exactly 10 bytes away. */
342 #undef PRINT_OPERAND_ADDRESS
343 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
344 { register rtx reg1, reg2, breg, ireg; \
345 register rtx addr = ADDR; \
346 rtx offset; \
347 switch (GET_CODE (addr)) \
349 case REG: \
350 fprintf (FILE, "(%s)", reg_names[REGNO (addr)]); \
351 break; \
352 case PRE_DEC: \
353 fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); \
354 break; \
355 case POST_INC: \
356 fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); \
357 break; \
358 case PLUS: \
359 reg1 = 0; reg2 = 0; \
360 ireg = 0; breg = 0; \
361 offset = 0; \
362 if (CONSTANT_ADDRESS_P (XEXP (addr, 0))) \
364 offset = XEXP (addr, 0); \
365 addr = XEXP (addr, 1); \
367 else if (CONSTANT_ADDRESS_P (XEXP (addr, 1))) \
369 offset = XEXP (addr, 1); \
370 addr = XEXP (addr, 0); \
372 if (GET_CODE (addr) != PLUS) ; \
373 else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND) \
375 reg1 = XEXP (addr, 0); \
376 addr = XEXP (addr, 1); \
378 else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND) \
380 reg1 = XEXP (addr, 1); \
381 addr = XEXP (addr, 0); \
383 else if (GET_CODE (XEXP (addr, 0)) == MULT) \
385 reg1 = XEXP (addr, 0); \
386 addr = XEXP (addr, 1); \
388 else if (GET_CODE (XEXP (addr, 1)) == MULT) \
390 reg1 = XEXP (addr, 1); \
391 addr = XEXP (addr, 0); \
393 else if (GET_CODE (XEXP (addr, 0)) == REG) \
395 reg1 = XEXP (addr, 0); \
396 addr = XEXP (addr, 1); \
398 else if (GET_CODE (XEXP (addr, 1)) == REG) \
400 reg1 = XEXP (addr, 1); \
401 addr = XEXP (addr, 0); \
403 if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT \
404 || GET_CODE (addr) == SIGN_EXTEND) \
405 { if (reg1 == 0) reg1 = addr; else reg2 = addr; addr = 0; } \
406 /* for OLD_INDEXING \
407 else if (GET_CODE (addr) == PLUS) \
409 if (GET_CODE (XEXP (addr, 0)) == REG) \
411 reg2 = XEXP (addr, 0); \
412 addr = XEXP (addr, 1); \
414 else if (GET_CODE (XEXP (addr, 1)) == REG) \
416 reg2 = XEXP (addr, 1); \
417 addr = XEXP (addr, 0); \
420 */ \
421 if (offset != 0) { if (addr != 0) abort (); addr = offset; } \
422 if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND \
423 || GET_CODE (reg1) == MULT)) \
424 || (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2)))) \
425 { breg = reg2; ireg = reg1; } \
426 else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1))) \
427 { breg = reg1; ireg = reg2; } \
428 if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF) \
429 { int scale = 1; \
430 if (GET_CODE (ireg) == MULT) \
431 { scale = INTVAL (XEXP (ireg, 1)); \
432 ireg = XEXP (ireg, 0); } \
433 if (GET_CODE (ireg) == SIGN_EXTEND) \
434 fprintf (FILE, "10(%%pc,%s.w", \
435 reg_names[REGNO (XEXP (ireg, 0))]); \
436 else \
437 fprintf (FILE, "10(%%pc,%s.l", \
438 reg_names[REGNO (ireg)]); \
439 if (scale != 1) fprintf (FILE, "*%d", scale); \
440 putc (')', FILE); \
441 break; } \
442 if (ireg != 0 || breg != 0) \
443 { int scale = 1; \
444 if (breg == 0) \
445 abort (); \
446 if (addr != 0) \
447 output_addr_const (FILE, addr); \
448 fprintf (FILE, "(%s", reg_names[REGNO (breg)]); \
449 if (ireg != 0) \
450 putc (',', FILE); \
451 if (ireg != 0 && GET_CODE (ireg) == MULT) \
452 { scale = INTVAL (XEXP (ireg, 1)); \
453 ireg = XEXP (ireg, 0); } \
454 if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \
455 fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]); \
456 else if (ireg != 0) \
457 fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]); \
458 if (scale != 1) fprintf (FILE, "*%d", scale); \
459 putc (')', FILE); \
460 break; \
462 else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF) \
463 { fprintf (FILE, "10(%%pc,%s.w)", \
464 reg_names[REGNO (reg1)]); \
465 break; } \
466 default: \
467 output_addr_const (FILE, addr); \
472 /* Override usual definitions of SDB output macros.
473 These definitions differ only in the absence of the period
474 at the beginning of the name of the directive
475 and in the use of `~' as the symbol for the current location. */
477 #define PUT_SDB_SCL(a) fprintf(asm_out_file, "\tscl\t%d;", (a))
478 #define PUT_SDB_INT_VAL(a) fprintf (asm_out_file, "\tval\t%d;", (a))
479 #define PUT_SDB_VAL(a) \
480 ( fputs ("\tval\t", asm_out_file), \
481 output_addr_const (asm_out_file, (a)), \
482 fputc (';', asm_out_file))
484 #define PUT_SDB_DEF(a) \
485 do { fprintf (asm_out_file, "\tdef\t"); \
486 ASM_OUTPUT_LABELREF (asm_out_file, a); \
487 fprintf (asm_out_file, ";"); } while (0)
489 #define PUT_SDB_PLAIN_DEF(a) fprintf(asm_out_file,"\tdef\t~%s;",a)
490 #define PUT_SDB_ENDEF fputs("\tendef\n", asm_out_file)
491 #define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\ttype\t0%o;", a)
492 #define PUT_SDB_SIZE(a) fprintf(asm_out_file, "\tsize\t%d;", a)
493 #define PUT_SDB_START_DIM fprintf(asm_out_file, "\tdim\t")
494 #define PUT_SDB_NEXT_DIM(a) fprintf(asm_out_file, "%d,", a)
495 #define PUT_SDB_LAST_DIM(a) fprintf(asm_out_file, "%d;", a)
497 #define PUT_SDB_TAG(a) \
498 do { fprintf (asm_out_file, "\ttag\t"); \
499 ASM_OUTPUT_LABELREF (asm_out_file, a); \
500 fprintf (asm_out_file, ";"); } while (0)
502 #define PUT_SDB_BLOCK_START(LINE) \
503 fprintf (asm_out_file, \
504 "\tdef\t~bb;\tval\t~;\tscl\t100;\tline\t%d;\tendef\n", \
505 (LINE))
507 #define PUT_SDB_BLOCK_END(LINE) \
508 fprintf (asm_out_file, \
509 "\tdef\t~eb;\tval\t~;\tscl\t100;\tline\t%d;\tendef\n", \
510 (LINE))
512 #define PUT_SDB_FUNCTION_START(LINE) \
513 fprintf (asm_out_file, \
514 "\tdef\t~bf;\tval\t~;\tscl\t101;\tline\t%d;\tendef\n", \
515 (LINE))
517 #define PUT_SDB_FUNCTION_END(LINE) \
518 fprintf (asm_out_file, \
519 "\tdef\t~ef;\tval\t~;\tscl\t101;\tline\t%d;\tendef\n", \
520 (LINE))
522 #define PUT_SDB_EPILOGUE_END(NAME) \
523 fprintf (asm_out_file, \
524 "\tdef\t%s;\tval\t~;\tscl\t-1;\tendef\n", \
525 (NAME))
527 #define SDB_GENERATE_FAKE(BUFFER, NUMBER) \
528 sprintf ((BUFFER), "~%dfake", (NUMBER));
530 #define NO_DOLLAR_IN_LABEL
531 #define NO_DOT_IN_LABEL
533 /* The usual definitions don't work because neither $ nor . is allowed. */
534 #define CONSTRUCTOR_NAME_FORMAT "_GLOBAL_%%I\%%%s"
536 /* Define a few machine-specific details
537 of the implementation of constructors.
539 The __CTORS_LIST__ goes in the .init section. Define CTOR_LIST_BEGIN
540 and CTOR_LIST_END to contribute to the .init section an instruction to
541 push a word containing 0 (or some equivalent of that). */
543 #undef INIT_SECTION_ASM_OP
544 #define INIT_SECTION_ASM_OP "\tsection\t~init"
545 #undef FINI_SECTION_ASM_OP
546 #define FINI_SECTION_ASM_OP "\tsection\t~fini"
547 #undef READONLY_DATA_SECTION_ASM_OP
548 #define READONLY_DATA_SECTION_ASM_OP "\tsection\t~rodata"
550 #define CTOR_LIST_BEGIN \
551 asm (INIT_SECTION_ASM_OP); \
552 asm ("clr.l -(%sp)")
553 #define CTOR_LIST_END CTOR_LIST_BEGIN
555 #define BSS_SECTION_ASM_OP "\tsection\t~bss"
557 #define TARGET_ASM_CONSTRUCTOR m68k_svr3_asm_out_constructor