|
|
1.1 root 1: /* Definitions of target machine for GNU compiler.
2: Commodore Amiga A3000UX version.
3:
4: Copyright (C) 1991 Free Software Foundation, Inc.
5:
6: This file is part of GNU CC.
7:
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 1, or (at your option)
11: any later version.
12:
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.
17:
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, 675 Mass Ave, Cambridge, MA 02139, USA. */
21:
22: #include "m68kv4.h"
23:
1.1.1.3 ! root 24: /* Alter assembler syntax for fsgldiv and fsglmul.
! 25: It is highly likely that this is a generic SGS m68k assembler dependency.
! 26: If so, it should eventually be handled in the m68ksgs.h ASM_OUTPUT_OPCODE
! 27: macro, like the other SGS assembler quirks. -fnf */
1.1.1.2 root 28:
1.1.1.3 ! root 29: #define FSGLDIV_USE_S /* Use fsgldiv.s, not fsgldiv.x */
! 30: #define FSGLMUL_USE_S /* Use fsglmul.s, not fsglmul.x */
1.1.1.2 root 31:
1.1 root 32: /* Names to predefine in the preprocessor for this target machine. For the
33: Amiga, these definitions match those of the native AT&T compiler. Note
34: that we override the definition in m68kv4.h, where SVR4 is defined and
35: AMIX isn't. */
36:
37: #undef CPP_PREDEFINES
38: #define CPP_PREDEFINES \
39: "-Dm68k -Dunix -DAMIX -Amachine(m68k) -Acpu(m68k) -Asystem(unix) -Alint(off)"
40:
41: /* At end of a switch table, define LDnnn iff the symbol LInnn was defined.
42: Some SGS assemblers have a bug such that "Lnnn-LInnn-2.b(pc,d0.l*2)"
43: fails to assemble. Luckily "Lnnn(pc,d0.l*2)" produces the results
1.1.1.2 root 44: we want. This difference can be accommodated by making the assembler
1.1 root 45: define such "LDnnn" to be either "Lnnn-LInnn-2.b", "Lnnn", or any other
46: string, as necessary. This is accomplished via the ASM_OUTPUT_CASE_END
47: macro. (the Amiga assembler has this bug) */
48:
49: #undef ASM_OUTPUT_CASE_END
50: #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \
51: do { \
1.1.1.2 root 52: if (switch_table_difference_label_flag) \
1.1.1.3 ! root 53: asm_fprintf ((FILE), "\t%s %LLD%d,%LL%d\n", SET_ASM_OP, (NUM), (NUM));\
1.1.1.2 root 54: switch_table_difference_label_flag = 0; \
1.1 root 55: } while (0)
56:
1.1.1.2 root 57: int switch_table_difference_label_flag;
58:
1.1 root 59: /* This says how to output assembler code to declare an
60: uninitialized external linkage data object. Under SVR4,
61: the linker seems to want the alignment of data objects
62: to depend on their types. We do exactly that here.
63: [This macro overrides the one in svr4.h because the amix assembler
64: has a minimum default alignment of 4, and will not accept any
65: explicit alignment smaller than this. -fnf] */
66:
67: #undef ASM_OUTPUT_ALIGNED_COMMON
68: #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
69: do { \
70: fputs ("\t.comm\t", (FILE)); \
71: assemble_name ((FILE), (NAME)); \
72: fprintf ((FILE), ",%u,%u\n", (SIZE), MAX ((ALIGN) / BITS_PER_UNIT, 4)); \
73: } while (0)
74:
75: /* This says how to output assembler code to declare an
76: uninitialized internal linkage data object. Under SVR4,
77: the linker seems to want the alignment of data objects
78: to depend on their types. We do exactly that here.
79: [This macro overrides the one in svr4.h because the amix assembler
80: has a minimum default alignment of 4, and will not accept any
81: explicit alignment smaller than this. -fnf] */
82:
83: #undef ASM_OUTPUT_ALIGNED_LOCAL
84: #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
85: do { \
1.1.1.3 ! root 86: fprintf ((FILE), "\t%s\t%s,%u,%u\n", \
1.1 root 87: BSS_ASM_OP, (NAME), (SIZE), MAX ((ALIGN) / BITS_PER_UNIT, 4)); \
88: } while (0)
89:
90: /* This definition of ASM_OUTPUT_ASCII is the same as the one in m68ksgs.h,
91: which has been overridden by the one in svr4.h. However, we can't use
92: the one in svr4.h because the amix assembler croaks on some of the
93: strings that it emits (such as .string "\"%s\"\n"). */
94:
95: #undef ASM_OUTPUT_ASCII
96: #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
97: { \
98: register int sp = 0, lp = 0, ch; \
1.1.1.2 root 99: fprintf ((FILE), "\t%s ", BYTE_ASM_OP); \
1.1 root 100: do { \
101: ch = (PTR)[sp]; \
102: if (ch > ' ' && ! (ch & 0x80) && ch != '\\') \
103: { \
104: fprintf ((FILE), "'%c", ch); \
105: } \
106: else \
107: { \
108: fprintf ((FILE), "0x%x", ch); \
109: } \
110: if (++sp < (LEN)) \
111: { \
112: if ((sp % 10) == 0) \
113: { \
1.1.1.2 root 114: fprintf ((FILE), "\n\t%s ", BYTE_ASM_OP); \
1.1 root 115: } \
116: else \
117: { \
118: putc (',', (FILE)); \
119: } \
120: } \
121: } while (sp < (LEN)); \
122: putc ('\n', (FILE)); \
123: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.