1 /* Definitions of target machine for GNU compiler. "naked" 68020.
2 Copyright (C) 1994, 1996, 2003 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* Default to m68k (m68020). */
22 #ifndef TARGET_CPU_DEFAULT
23 #define TARGET_CPU_DEFAULT M68K_CPU_m68k
26 /* These are values set by the configure script in TARGET_CPU_DEFAULT.
27 They are ((desired value for TARGET_DEFAULT) << 4) + sequential integer.
28 See m68k.h for the values (it should really define MASK_FOO so we can
30 #define M68K_CPU_m68k ((7 << 4) + 0)
31 #define M68K_CPU_m68000 ((0 << 4) + 1)
32 #define M68K_CPU_m68010 ((0 << 4) + 1) /* make same as m68000 */
33 #define M68K_CPU_m68020 ((7 << 4) + 2)
34 #define M68K_CPU_m68030 ((7 << 4) + 3)
35 #define M68K_CPU_m68040 ((01007 << 4) + 4)
36 #define M68K_CPU_m68302 ((0 << 4) + 5)
37 #define M68K_CPU_m68332 ((1 << 4) + 6)
39 /* This is tested for below, so if target wants to override this, it
40 just set this first in cover file. */
41 #ifndef TARGET_DEFAULT
42 #define TARGET_DEFAULT (TARGET_CPU_DEFAULT >> 4)
45 /* Defaults for the various specs below.
46 These are collected here so we only test TARGET_CPU_DEFAULT once. */
47 /* ??? CC1_CPU_DEFAULT_SPEC was copied over from the earlier version of
48 this file. However, it's not used anywhere here because it doesn't
49 seem to be necessary. */
50 #if TARGET_CPU_DEFAULT == M68K_CPU_m68k || TARGET_CPU_DEFAULT == M68K_CPU_m68020
51 #define ASM_CPU_DEFAULT_SPEC "-mc68020"
52 #define CC1_CPU_DEFAULT_SPEC "-m68020"
54 #if TARGET_CPU_DEFAULT == M68K_CPU_m68000
55 #define ASM_CPU_DEFAULT_SPEC "-mc68000"
56 #define CC1_CPU_DEFAULT_SPEC "-m68000"
58 #if TARGET_CPU_DEFAULT == M68K_CPU_m68030
59 #define ASM_CPU_DEFAULT_SPEC "-mc68030"
60 #define CC1_CPU_DEFAULT_SPEC "-m68030"
62 #if TARGET_CPU_DEFAULT == M68K_CPU_m68040
63 #define ASM_CPU_DEFAULT_SPEC "-mc68040"
64 #define CC1_CPU_DEFAULT_SPEC "-m68040"
66 #if TARGET_CPU_DEFAULT == M68K_CPU_m68302
67 #define ASM_CPU_DEFAULT_SPEC "-mc68302"
68 #define CC1_CPU_DEFAULT_SPEC "-m68302"
70 #if TARGET_CPU_DEFAULT == M68K_CPU_m68332
71 #define ASM_CPU_DEFAULT_SPEC "-mc68332"
72 #define CC1_CPU_DEFAULT_SPEC "-m68332"
74 Unrecognized value in TARGET_CPU_DEFAULT.
82 /* Pass flags to gas indicating which type of processor we have. */
86 %{m68851}%{mno-68851}%{m68881}%{mno-68881}%{msoft-float:-mno-68881} %{m68000}%{m68302}%{mc68000}%{m68010}%{m68020}%{mc68020}%{m68030}%{m68040}%{m68020-40:-mc68040} %{m68020-60:-mc68040} %{m68060}%{mcpu32}%{m68332}%{m5200}%{m5206e}%{m528x}%{m5307}%{m5407}%{!mc68000:%{!m68000:%{!m68302:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68020-60:%{!m68060:%{!mcpu32:%{!m68332:%{!m5200:%{!m5206e:%{!m528x:%{!m5307:%{!m5407:%(asm_cpu_default)}}}}}}}}}}}}}}}}}} \
89 /* cc1/cc1plus always receives all the -m flags. If the specs strings above
90 are consistent with the TARGET_OPTIONS flags in m68k.h, there should be no
91 need for any further cc1/cc1plus specs. */
96 /* This macro defines names of additional specifications to put in the specs
97 that can be used in various specifications like CC1_SPEC. Its definition
98 is an initializer with a subgrouping for each command option.
100 Each subgrouping contains a string constant, that defines the
101 specification name, and a string constant that used by the GNU CC driver
104 Do not define this macro if it does not need to do anything. */
106 #define EXTRA_SPECS \
107 { "asm_cpu_default", ASM_CPU_DEFAULT_SPEC }, \
108 { "cc1_cpu_default", CC1_CPU_DEFAULT_SPEC }, \
109 SUBTARGET_EXTRA_SPECS
111 #define CPP_SUBTARGET_SPEC ""
112 #define SUBTARGET_EXTRA_SPECS
114 /* Avoid building multilib libraries for the defaults.
115 For targets not handled here, just build the full set of multilibs.
116 The default is m68k 99.9% of the time anyway. */
118 #if TARGET_CPU_DEFAULT == M68K_CPU_m68k || TARGET_CPU_DEFAULT == M68K_CPU_m68020
119 #if TARGET_DEFAULT & MASK_68881
120 #define MULTILIB_DEFAULTS { "m68020", "m68881" }
122 #define MULTILIB_DEFAULTS { "m68020", "msoft-float" }
126 #if TARGET_CPU_DEFAULT == M68K_CPU_m68000 || TARGET_CPU_DEFAULT == M68K_CPU_m68302
127 #if TARGET_DEFAULT & MASK_68881
128 #define MULTILIB_DEFAULTS { "m68000", "m68881" }
130 #define MULTILIB_DEFAULTS { "m68000", "msoft-float" }