1 /* Definitions of target machine for GNU compiler. Altos 3068 68020 version.
2 Copyright (C) 1988, 1989, 1993, 1996 Free Software Foundation, Inc.
3 Contributed by Jyrki Kuoppala <jkp@cs.hut.fi>
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)
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. */
23 #include "m68k/m68k.h"
25 /* See m68k.h. 7 means 68020 with 68881. */
26 /* 5 is without 68881. Change to 7 if you have 68881 */
28 #ifndef TARGET_DEFAULT
29 #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68020)
31 /* Don't try using XFmode. */
32 #undef LONG_DOUBLE_TYPE_SIZE
33 #define LONG_DOUBLE_TYPE_SIZE 64
36 /* Define __HAVE_68881__ in preprocessor,
37 according to the -m flags.
38 This will control the use of inline 68881 insns in certain macros.
39 Also inform the program which CPU this is for. */
41 #if TARGET_DEFAULT & MASK_68881
43 /* -m68881 is the default */
45 "%{!msoft-float:-D__HAVE_68881__ }\
46 %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
50 /* -msoft-float is the default */
52 "%{m68881:-D__HAVE_68881__ }\
53 %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
57 /* -m68000 requires special flags to the assembler. */
60 "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
62 /* Names to predefine in the preprocessor for this target machine. */
64 #define CPP_PREDEFINES "-Dmc68000 -DPORTAR -Dmc68k32 -Uvax -Dm68k -Dunix -Asystem=unix -Acpu=m68k -Amachine=m68k"
66 /* Every structure or union's size must be a multiple of 2 bytes. */
68 #define STRUCTURE_SIZE_BOUNDARY 16
70 /* Generate calls to memcpy, memcmp and memset. */
71 #define TARGET_MEM_FUNCTIONS
73 /* We use gnu assembler, linker and gdb, so we want DBX format. */
75 #define DBX_DEBUGGING_INFO
77 /* Tell some conditionals we will use GAS. Is this really used? */
81 /* This is how to output an assembler line defining a `double' constant. */
83 #undef ASM_OUTPUT_DOUBLE
84 #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
86 REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
87 fprintf (FILE, "\t.double 0r%s\n", dstr); \
90 /* This is how to output an assembler line defining a `float' constant. */
92 #undef ASM_OUTPUT_FLOAT
93 #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
95 REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
96 fprintf (FILE, "\t.single 0r%s\n", dstr); \
99 #undef ASM_OUTPUT_FLOAT_OPERAND
100 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
105 REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \
106 fprintf (FILE, "#0r%s", dstr); \
111 REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
112 if (sizeof (int) == sizeof (long)) \
113 asm_fprintf ((FILE), "%I0x%x", (int) l); \
115 asm_fprintf ((FILE), "%I0x%lx", l); \
119 #undef ASM_OUTPUT_DOUBLE_OPERAND
120 #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
121 do { char dstr[30]; \
122 REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
123 fprintf (FILE, "#0r%s", dstr); \
126 /* Return pointer values in both d0 and a0. */
128 #undef FUNCTION_EXTRA_EPILOGUE
129 #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \
131 if (current_function_returns_pointer \
132 && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \
133 fprintf (FILE, "\tmovel d0,a0\n"); \