1992-01-20 01:29:14 -05:00
|
|
|
|
/* Definitions of target machine for GNU compiler.
|
|
|
|
|
Commodore Amiga A3000UX version.
|
|
|
|
|
|
1993-12-13 19:09:31 -05:00
|
|
|
|
Copyright (C) 1991, 1993 Free Software Foundation, Inc.
|
1992-01-20 01:29:14 -05:00
|
|
|
|
|
|
|
|
|
This file is part of GNU CC.
|
|
|
|
|
|
|
|
|
|
GNU CC is free software; you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation; either version 1, or (at your option)
|
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
|
|
GNU CC is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with GNU CC; see the file COPYING. If not, write to
|
|
|
|
|
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
|
|
|
|
1993-01-05 03:27:46 -05:00
|
|
|
|
#include "m68k/m68kv4.h"
|
1992-01-20 01:29:14 -05:00
|
|
|
|
|
1993-10-27 14:05:30 -04:00
|
|
|
|
/* rhealey@aggregate.com says dots are no good either. */
|
|
|
|
|
#define NO_DOT_IN_LABEL
|
1993-10-27 00:01:32 -04:00
|
|
|
|
|
1992-09-07 02:17:38 -04:00
|
|
|
|
/* Alter assembler syntax for fsgldiv and fsglmul.
|
|
|
|
|
It is highly likely that this is a generic SGS m68k assembler dependency.
|
1993-01-05 03:56:09 -05:00
|
|
|
|
If so, it should eventually be handled in the m68k/sgs.h ASM_OUTPUT_OPCODE
|
1992-09-07 02:17:38 -04:00
|
|
|
|
macro, like the other SGS assembler quirks. -fnf */
|
1992-03-26 01:32:08 -05:00
|
|
|
|
|
1992-09-07 02:17:38 -04:00
|
|
|
|
#define FSGLDIV_USE_S /* Use fsgldiv.s, not fsgldiv.x */
|
|
|
|
|
#define FSGLMUL_USE_S /* Use fsglmul.s, not fsglmul.x */
|
1992-03-26 01:32:08 -05:00
|
|
|
|
|
1992-01-20 01:29:14 -05:00
|
|
|
|
/* Names to predefine in the preprocessor for this target machine. For the
|
|
|
|
|
Amiga, these definitions match those of the native AT&T compiler. Note
|
|
|
|
|
that we override the definition in m68kv4.h, where SVR4 is defined and
|
|
|
|
|
AMIX isn't. */
|
|
|
|
|
|
|
|
|
|
#undef CPP_PREDEFINES
|
|
|
|
|
#define CPP_PREDEFINES \
|
1993-06-25 17:34:25 -04:00
|
|
|
|
"-Dm68k -Dunix -DAMIX -D__svr4__ -D__motorola__ \
|
|
|
|
|
-Amachine(m68k) -Acpu(m68k) -Asystem(unix) -Alint(off)"
|
1992-01-20 01:29:14 -05:00
|
|
|
|
|
|
|
|
|
/* At end of a switch table, define LDnnn iff the symbol LInnn was defined.
|
|
|
|
|
Some SGS assemblers have a bug such that "Lnnn-LInnn-2.b(pc,d0.l*2)"
|
|
|
|
|
fails to assemble. Luckily "Lnnn(pc,d0.l*2)" produces the results
|
1992-04-16 22:05:56 -04:00
|
|
|
|
we want. This difference can be accommodated by making the assembler
|
1992-01-20 01:29:14 -05:00
|
|
|
|
define such "LDnnn" to be either "Lnnn-LInnn-2.b", "Lnnn", or any other
|
|
|
|
|
string, as necessary. This is accomplished via the ASM_OUTPUT_CASE_END
|
|
|
|
|
macro. (the Amiga assembler has this bug) */
|
|
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_CASE_END
|
|
|
|
|
#define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \
|
|
|
|
|
do { \
|
1992-04-16 22:05:56 -04:00
|
|
|
|
if (switch_table_difference_label_flag) \
|
1992-07-03 16:18:57 -04:00
|
|
|
|
asm_fprintf ((FILE), "\t%s %LLD%d,%LL%d\n", SET_ASM_OP, (NUM), (NUM));\
|
1992-04-23 12:39:34 -04:00
|
|
|
|
switch_table_difference_label_flag = 0; \
|
1992-01-20 01:29:14 -05:00
|
|
|
|
} while (0)
|
|
|
|
|
|
1992-04-16 22:05:56 -04:00
|
|
|
|
int switch_table_difference_label_flag;
|
|
|
|
|
|
1992-01-20 01:29:14 -05:00
|
|
|
|
/* This says how to output assembler code to declare an
|
|
|
|
|
uninitialized external linkage data object. Under SVR4,
|
|
|
|
|
the linker seems to want the alignment of data objects
|
|
|
|
|
to depend on their types. We do exactly that here.
|
|
|
|
|
[This macro overrides the one in svr4.h because the amix assembler
|
|
|
|
|
has a minimum default alignment of 4, and will not accept any
|
|
|
|
|
explicit alignment smaller than this. -fnf] */
|
|
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_ALIGNED_COMMON
|
|
|
|
|
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
|
|
|
|
|
do { \
|
|
|
|
|
fputs ("\t.comm\t", (FILE)); \
|
|
|
|
|
assemble_name ((FILE), (NAME)); \
|
|
|
|
|
fprintf ((FILE), ",%u,%u\n", (SIZE), MAX ((ALIGN) / BITS_PER_UNIT, 4)); \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
/* This says how to output assembler code to declare an
|
|
|
|
|
uninitialized internal linkage data object. Under SVR4,
|
|
|
|
|
the linker seems to want the alignment of data objects
|
|
|
|
|
to depend on their types. We do exactly that here.
|
|
|
|
|
[This macro overrides the one in svr4.h because the amix assembler
|
|
|
|
|
has a minimum default alignment of 4, and will not accept any
|
|
|
|
|
explicit alignment smaller than this. -fnf] */
|
|
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_ALIGNED_LOCAL
|
|
|
|
|
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
|
|
|
|
|
do { \
|
1992-07-03 16:18:57 -04:00
|
|
|
|
fprintf ((FILE), "\t%s\t%s,%u,%u\n", \
|
1992-01-20 01:29:14 -05:00
|
|
|
|
BSS_ASM_OP, (NAME), (SIZE), MAX ((ALIGN) / BITS_PER_UNIT, 4)); \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
1993-01-05 03:56:09 -05:00
|
|
|
|
/* This definition of ASM_OUTPUT_ASCII is the same as the one in m68k/sgs.h,
|
1992-01-20 01:29:14 -05:00
|
|
|
|
which has been overridden by the one in svr4.h. However, we can't use
|
|
|
|
|
the one in svr4.h because the amix assembler croaks on some of the
|
|
|
|
|
strings that it emits (such as .string "\"%s\"\n"). */
|
|
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_ASCII
|
|
|
|
|
#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
|
1993-12-13 19:09:31 -05:00
|
|
|
|
do { \
|
1992-01-20 01:29:14 -05:00
|
|
|
|
register int sp = 0, lp = 0, ch; \
|
1993-12-13 19:09:31 -05:00
|
|
|
|
fprintf ((FILE), "\t%s ", BYTE_ASM_OP); \
|
1992-01-20 01:29:14 -05:00
|
|
|
|
do { \
|
|
|
|
|
ch = (PTR)[sp]; \
|
|
|
|
|
if (ch > ' ' && ! (ch & 0x80) && ch != '\\') \
|
|
|
|
|
{ \
|
|
|
|
|
fprintf ((FILE), "'%c", ch); \
|
|
|
|
|
} \
|
|
|
|
|
else \
|
|
|
|
|
{ \
|
|
|
|
|
fprintf ((FILE), "0x%x", ch); \
|
|
|
|
|
} \
|
|
|
|
|
if (++sp < (LEN)) \
|
|
|
|
|
{ \
|
|
|
|
|
if ((sp % 10) == 0) \
|
|
|
|
|
{ \
|
1992-04-24 21:17:01 -04:00
|
|
|
|
fprintf ((FILE), "\n\t%s ", BYTE_ASM_OP); \
|
1992-01-20 01:29:14 -05:00
|
|
|
|
} \
|
|
|
|
|
else \
|
|
|
|
|
{ \
|
|
|
|
|
putc (',', (FILE)); \
|
|
|
|
|
} \
|
|
|
|
|
} \
|
|
|
|
|
} while (sp < (LEN)); \
|
|
|
|
|
putc ('\n', (FILE)); \
|
1993-12-13 19:09:31 -05:00
|
|
|
|
} while (0)
|
1993-05-21 16:06:37 -04:00
|
|
|
|
|
1993-10-27 14:05:30 -04:00
|
|
|
|
/* The following should be unnecessary as a result of PIC_CASE_VECTOR_ADDRESS.
|
|
|
|
|
But rhealey@aggregate.com says they are still needed. */
|
1993-08-01 16:16:30 -04:00
|
|
|
|
|
1993-05-21 16:06:37 -04:00
|
|
|
|
/* Override these for the sake of an assembler bug: the Amix
|
|
|
|
|
assembler can't handle .LC0@GOT syntax. This pollutes the final
|
|
|
|
|
table for shared librarys but what's a poor soul to do; sigh... RFH */
|
|
|
|
|
|
|
|
|
|
#undef ASM_GENERATE_INTERNAL_LABEL
|
|
|
|
|
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
|
|
|
|
|
if (flag_pic && !strcmp(PREFIX,"LC")) \
|
|
|
|
|
sprintf (LABEL, "*%s%%%d", PREFIX, NUM); \
|
|
|
|
|
else \
|
|
|
|
|
sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM)
|
|
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_INTERNAL_LABEL
|
|
|
|
|
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
|
|
|
|
|
if (flag_pic && !strcmp(PREFIX,"LC")) \
|
|
|
|
|
asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM); \
|
|
|
|
|
else \
|
|
|
|
|
asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM)
|