1/* Definitions of target machine for GNU compiler. "naked" 68020. 2 Copyright (C) 1994, 1996, 2003 Free Software Foundation, Inc. 3 4This file is part of GCC. 5 6GCC is free software; you can redistribute it and/or modify 7it under the terms of the GNU General Public License as published by 8the Free Software Foundation; either version 2, or (at your option) 9any later version. 10 11GCC is distributed in the hope that it will be useful, 12but WITHOUT ANY WARRANTY; without even the implied warranty of 13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14GNU General Public License for more details. 15 16You should have received a copy of the GNU General Public License 17along with GCC; see the file COPYING. If not, write to 18the Free Software Foundation, 51 Franklin Street, Fifth Floor, 19Boston, MA 02110-1301, USA. */ 20 21/* Default to m68k (m68020). */ 22#ifndef TARGET_CPU_DEFAULT 23#define TARGET_CPU_DEFAULT M68K_CPU_m68k 24#endif 25 26/* These are values set by the configure script in TARGET_CPU_DEFAULT. 27 They are (sequential integer + (desired value for TARGET_DEFAULT) << 4). */ 28#define M68K_CPU_m68k (0 + ((MASK_68020|MASK_68881|MASK_BITFIELD)<<4)) 29#define M68K_CPU_m68000 (1 + (0 << 4)) 30#define M68K_CPU_m68010 (1 + (0 << 4)) /* make same as m68000 */ 31#define M68K_CPU_m68020 (2 + ((MASK_68020|MASK_68881|MASK_BITFIELD) << 4)) 32#define M68K_CPU_m68030 (3 + ((MASK_68030|MASK_68020|MASK_68881|MASK_BITFIELD) << 4)) 33#define M68K_CPU_m68040 (4 + ((MASK_68040_ONLY|MASK_68020|MASK_68881|MASK_BITFIELD) << 4)) 34#define M68K_CPU_m68302 (5 + (0 << 4)) 35#define M68K_CPU_m68332 (6 + (MASK_68020 << 4)) 36 37/* This is tested for below, so if target wants to override this, it 38 just set this first in cover file. */ 39#ifndef TARGET_DEFAULT 40#define TARGET_DEFAULT (TARGET_CPU_DEFAULT >> 4) 41#endif 42 43/* Defaults for the various specs below. 44 These are collected here so we only test TARGET_CPU_DEFAULT once. */ 45/* ??? CC1_CPU_DEFAULT_SPEC was copied over from the earlier version of 46 this file. However, it's not used anywhere here because it doesn't 47 seem to be necessary. */ 48#if TARGET_CPU_DEFAULT == M68K_CPU_m68k || TARGET_CPU_DEFAULT == M68K_CPU_m68020 49#define ASM_CPU_DEFAULT_SPEC "-mc68020" 50#define CC1_CPU_DEFAULT_SPEC "-m68020" 51#else 52#if TARGET_CPU_DEFAULT == M68K_CPU_m68000 53#define ASM_CPU_DEFAULT_SPEC "-mc68000" 54#define CC1_CPU_DEFAULT_SPEC "-m68000" 55#else 56#if TARGET_CPU_DEFAULT == M68K_CPU_m68030 57#define ASM_CPU_DEFAULT_SPEC "-mc68030" 58#define CC1_CPU_DEFAULT_SPEC "-m68030" 59#else 60#if TARGET_CPU_DEFAULT == M68K_CPU_m68040 61#define ASM_CPU_DEFAULT_SPEC "-mc68040" 62#define CC1_CPU_DEFAULT_SPEC "-m68040" 63#else 64#if TARGET_CPU_DEFAULT == M68K_CPU_m68302 65#define ASM_CPU_DEFAULT_SPEC "-mc68302" 66#define CC1_CPU_DEFAULT_SPEC "-m68302" 67#else 68#if TARGET_CPU_DEFAULT == M68K_CPU_m68332 69#define ASM_CPU_DEFAULT_SPEC "-mc68332" 70#define CC1_CPU_DEFAULT_SPEC "-m68332" 71#else 72Unrecognized value in TARGET_CPU_DEFAULT. 73#endif 74#endif 75#endif 76#endif 77#endif 78#endif 79 80/* Pass flags to gas indicating which type of processor we have. */ 81 82#undef ASM_SPEC 83#define ASM_SPEC "\ 84%{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)}}}}}}}}}}}}}}}}}} \ 85%{fPIC:--pcrel} %{fpic:--pcrel} %{msep-data:--pcrel} %{mid-shared-library:--pcrel} \ 86" 87 88/* cc1/cc1plus always receives all the -m flags. If the specs strings above 89 are consistent with the flags in m68k.opt, there should be no need for 90 any further cc1/cc1plus specs. */ 91 92#undef CC1_SPEC 93#define CC1_SPEC "" 94 95/* This macro defines names of additional specifications to put in the specs 96 that can be used in various specifications like CC1_SPEC. Its definition 97 is an initializer with a subgrouping for each command option. 98 99 Each subgrouping contains a string constant, that defines the 100 specification name, and a string constant that used by the GCC driver 101 program. 102 103 Do not define this macro if it does not need to do anything. */ 104 105#define EXTRA_SPECS \ 106 { "asm_cpu_default", ASM_CPU_DEFAULT_SPEC }, \ 107 { "cc1_cpu_default", CC1_CPU_DEFAULT_SPEC }, \ 108 SUBTARGET_EXTRA_SPECS 109 110#define CPP_SUBTARGET_SPEC "" 111#define SUBTARGET_EXTRA_SPECS 112 113/* Avoid building multilib libraries for the defaults. 114 For targets not handled here, just build the full set of multilibs. 115 The default is m68k 99.9% of the time anyway. */ 116 117#if TARGET_CPU_DEFAULT == M68K_CPU_m68k || TARGET_CPU_DEFAULT == M68K_CPU_m68020 118#if TARGET_DEFAULT & MASK_68881 119#define MULTILIB_DEFAULTS { "m68020", "m68881" } 120#else 121#define MULTILIB_DEFAULTS { "m68020", "msoft-float" } 122#endif 123#endif 124 125#if TARGET_CPU_DEFAULT == M68K_CPU_m68000 || TARGET_CPU_DEFAULT == M68K_CPU_m68302 126#if TARGET_DEFAULT & MASK_68881 127#define MULTILIB_DEFAULTS { "m68000", "m68881" } 128#else 129#define MULTILIB_DEFAULTS { "m68000", "msoft-float" } 130#endif 131#endif 132