1 /* Definitions of target machine for GNU compiler. Altos 3068 68020 version.
2 Copyright (C) 1988, 1989, 1993 Free Software Foundation, Inc.
4 Written by Jyrki Kuoppala <jkp@cs.hut.fi>
5 Last modified: Mon Mar 6 22:47:58 1989
7 This file is part of GNU CC.
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
24 #include "m68k/m68k.h"
26 /* See m68k.h. 7 means 68020 with 68881. */
27 /* 5 is without 68881. Change to 7 if you have 68881 */
29 #ifndef TARGET_DEFAULT
30 #define TARGET_DEFAULT 5
32 /* Don't try using XFmode. */
33 #undef LONG_DOUBLE_TYPE_SIZE
34 #define LONG_DOUBLE_TYPE_SIZE 64
37 /* Define __HAVE_68881__ in preprocessor,
38 according to the -m flags.
39 This will control the use of inline 68881 insns in certain macros.
40 Also inform the program which CPU this is for. */
42 #if TARGET_DEFAULT & 02
44 /* -m68881 is the default */
46 "%{!msoft-float:-D__HAVE_68881__ }\
47 %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
51 /* -msoft-float is the default */
53 "%{m68881:-D__HAVE_68881__ }\
54 %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
58 /* -m68000 requires special flags to the assembler. */
61 "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
63 /* Names to predefine in the preprocessor for this target machine. */
65 #define CPP_PREDEFINES "-Dmc68000 -DPORTAR -Dmc68k32 -Uvax -Dm68k -Dunix"
67 /* Every structure or union's size must be a multiple of 2 bytes. */
69 #define STRUCTURE_SIZE_BOUNDARY 16
71 /* Generate calls to memcpy, memcmp and memset. */
72 #define TARGET_MEM_FUNCTIONS
74 /* We use gnu assembler, linker and gdb, so we want DBX format. */
76 #define DBX_DEBUGGING_INFO
78 /* Tell some conditionals we will use GAS. Is this really used? */
82 /* This is how to output an assembler line defining a `double' constant. */
84 #undef ASM_OUTPUT_DOUBLE
85 #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
87 REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
88 fprintf (FILE, "\t.double 0r%s\n", dstr); \
91 /* This is how to output an assembler line defining a `float' constant. */
93 #undef ASM_OUTPUT_FLOAT
94 #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
96 REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
97 fprintf (FILE, "\t.single 0r%s\n", dstr); \
100 #undef ASM_OUTPUT_FLOAT_OPERAND
101 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
106 REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \
107 fprintf (FILE, "#0r%s", dstr); \
112 REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
113 if (sizeof (int) == sizeof (long)) \
114 asm_fprintf ((FILE), "%I0x%x", l); \
116 asm_fprintf ((FILE), "%I0x%lx", l); \
120 #undef ASM_OUTPUT_DOUBLE_OPERAND
121 #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
122 do { char dstr[30]; \
123 REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
124 fprintf (FILE, "#0r%s", dstr); \
127 /* Return pointer values in both d0 and a0. */
129 #undef FUNCTION_EXTRA_EPILOGUE
130 #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \
132 extern int current_function_returns_pointer; \
133 if ((current_function_returns_pointer) && \
134 ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode))\
135 fprintf (FILE, "\tmovel d0,a0\n"); \