* target.h (asm_out.byte_op, asm_out.aligned_op, asm_out.unaligned_op,
[official-gcc.git] / gcc / config / m68k / atari.h
blob12b106a4be5ea7f6cbe987c2a21acfd0d226fc5e
1 /* Definitions of target machine for GNU compiler.
2 Atari TT ASV version.
3 Copyright (C) 1994, 1995, 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)
10 any later version.
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 #include "m68k/m68kv4.h"
24 /* Dollars and dots in labels are not allowed. */
26 #define NO_DOLLAR_IN_LABEL
27 #define NO_DOT_IN_LABEL
29 /* Alter assembler syntax for fsgldiv and fsglmul.
30 It is highly likely that this is a generic SGS m68k assembler dependency.
31 If so, it should eventually be handled in the m68k/sgs.h ASM_OUTPUT_OPCODE
32 macro, like the other SGS assembler quirks. -fnf */
34 #define FSGLDIV_USE_S /* Use fsgldiv.s, not fsgldiv.x */
35 #define FSGLMUL_USE_S /* Use fsglmul.s, not fsglmul.x */
37 /* At end of a switch table, define LDnnn iff the symbol LInnn was defined.
38 Some SGS assemblers have a bug such that "Lnnn-LInnn-2.b(pc,d0.l*2)"
39 fails to assemble. Luckily "Lnnn(pc,d0.l*2)" produces the results
40 we want. This difference can be accommodated by making the assembler
41 define such "LDnnn" to be either "Lnnn-LInnn-2.b", "Lnnn", or any other
42 string, as necessary. This is accomplished via the ASM_OUTPUT_CASE_END
43 macro. (the Amiga assembler has this bug) */
45 #undef ASM_OUTPUT_CASE_END
46 #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \
47 do { \
48 if (switch_table_difference_label_flag) \
49 asm_fprintf ((FILE), "%s%LLD%d,%LL%d\n", SET_ASM_OP, (NUM), (NUM));\
50 switch_table_difference_label_flag = 0; \
51 } while (0)
53 int switch_table_difference_label_flag;
55 /* This definition of ASM_OUTPUT_ASCII is the same as the one in m68k/sgs.h,
56 which has been overridden by the one in svr4.h. However, we can't use
57 the one in svr4.h because the ASV assembler croaks on some of the
58 strings that it emits (such as .string "\"%s\"\n"). */
60 #undef ASM_OUTPUT_ASCII
61 #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
62 { \
63 register size_t sp = 0, limit = (LEN); \
64 fputs (integer_asm_op (1, TRUE), (FILE)); \
65 do { \
66 int ch = (PTR)[sp]; \
67 if (ch > ' ' && ! (ch & 0x80) && ch != '\\') \
68 { \
69 fprintf ((FILE), "'%c", ch); \
70 } \
71 else \
72 { \
73 fprintf ((FILE), "0x%x", ch); \
74 } \
75 if (++sp < limit) \
76 { \
77 if ((sp % 10) == 0) \
78 { \
79 fprintf ((FILE), "\n%s", integer_asm_op (1, TRUE)); \
80 } \
81 else \
82 { \
83 putc (',', (FILE)); \
84 } \
85 } \
86 } while (sp < limit); \
87 putc ('\n', (FILE)); \
90 /* Override these for the sake of an assembler bug: the ASV
91 assembler can't handle .LC0@GOT syntax. This pollutes the final
92 table for shared librarys but what's a poor soul to do; sigh... RFH */
94 #undef ASM_GENERATE_INTERNAL_LABEL
95 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
96 do { \
97 if (flag_pic && !strcmp(PREFIX,"LC")) \
98 sprintf (LABEL, "*%s%%%ld", PREFIX, (long)(NUM)); \
99 else \
100 sprintf (LABEL, "*%s%s%ld", LOCAL_LABEL_PREFIX, PREFIX, (long)(NUM)); \
101 } while (0)
103 #undef ASM_OUTPUT_INTERNAL_LABEL
104 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
105 if (flag_pic && !strcmp(PREFIX,"LC")) \
106 asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM); \
107 else \
108 asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM)