OSDN Git Service

2001-05-03 David O'Brien <obrien@FreeBSD.org>
[pf3gnuchains/gcc-fork.git] / gcc / config / m68k / altos3068.h
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>
4
5 This file is part of GNU CC.
6
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.
11
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.
16
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.  */
21
22
23 #include "m68k/m68k.h"
24
25 /* See m68k.h.  7 means 68020 with 68881.  */
26 /* 5 is without 68881.  Change to 7 if you have 68881 */
27
28 #ifndef TARGET_DEFAULT
29 #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68020)
30
31 /* Don't try using XFmode.  */
32 #undef LONG_DOUBLE_TYPE_SIZE
33 #define LONG_DOUBLE_TYPE_SIZE 64
34 #endif
35
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.  */
40
41 #if TARGET_DEFAULT & MASK_68881
42
43 /* -m68881 is the default */
44 #define CPP_SPEC \
45 "%{!msoft-float:-D__HAVE_68881__ }\
46 %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
47
48 #else
49
50 /* -msoft-float is the default */
51 #define CPP_SPEC \
52 "%{m68881:-D__HAVE_68881__ }\
53 %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
54
55 #endif
56
57 /* -m68000 requires special flags to the assembler.  */
58
59 #define ASM_SPEC \
60  "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
61
62 /* Names to predefine in the preprocessor for this target machine.  */
63
64 #define CPP_PREDEFINES "-Dmc68000 -DPORTAR -Dmc68k32 -Uvax -Dm68k -Dunix -Asystem=unix  -Acpu=m68k -Amachine=m68k"
65
66 /* Every structure or union's size must be a multiple of 2 bytes.  */
67
68 #define STRUCTURE_SIZE_BOUNDARY 16
69
70 /* Generate calls to memcpy, memcmp and memset.  */
71 #define TARGET_MEM_FUNCTIONS
72
73 /* We use gnu assembler, linker and gdb, so we want DBX format.  */
74
75 #define DBX_DEBUGGING_INFO
76
77 /* Tell some conditionals we will use GAS.  Is this really used?  */
78
79 #define USE_GAS
80
81 /* This is how to output an assembler line defining a `double' constant.  */
82
83 #undef ASM_OUTPUT_DOUBLE
84 #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                   \
85   do { char dstr[30];                                   \
86        REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr);    \
87        fprintf (FILE, "\t.double 0r%s\n", dstr);        \
88      } while (0)
89
90 /* This is how to output an assembler line defining a `float' constant.  */
91
92 #undef ASM_OUTPUT_FLOAT
93 #define ASM_OUTPUT_FLOAT(FILE,VALUE)                    \
94   do { char dstr[30];                                   \
95        REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr);    \
96        fprintf (FILE, "\t.single 0r%s\n", dstr);        \
97      } while (0)
98
99 #undef ASM_OUTPUT_FLOAT_OPERAND
100 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)               \
101  do {                                                           \
102       if (CODE == 'f')                                          \
103         {                                                       \
104           char dstr[30];                                        \
105           REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr);          \
106           fprintf (FILE, "#0r%s", dstr);                        \
107         }                                                       \
108       else                                                      \
109         {                                                       \
110           long l;                                               \
111           REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);               \
112           if (sizeof (int) == sizeof (long))                    \
113             asm_fprintf ((FILE), "%I0x%x", l);                  \
114           else                                                  \
115             asm_fprintf ((FILE), "%I0x%lx", l);                 \
116         }                                                       \
117      } while (0)
118
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);                   \
124      } while (0)
125
126 /* Return pointer values in both d0 and a0.  */
127
128 #undef FUNCTION_EXTRA_EPILOGUE
129 #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE)                             \
130 {                                                                       \
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");                                  \
134 }