]>
Commit | Line | Data |
---|---|---|
047292d2 RS |
1 | /* Definitions of target machine for GNU compiler. ISI 68000/68020 version. |
2 | Intended only for use with GAS, and not ISI's assembler, which is buggy | |
c5c76735 | 3 | Copyright (C) 1988, 1996, 1998, 1999 Free Software Foundation, Inc. |
047292d2 RS |
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 | |
0e29e3c9 RK |
19 | the Free Software Foundation, 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. */ | |
047292d2 | 21 | |
57e51b0e | 22 | #include "m68k/m68k.h" |
047292d2 | 23 | |
047292d2 | 24 | /* See m68k.h. 7 means 68020 with 68881. */ |
047292d2 | 25 | #ifndef TARGET_DEFAULT |
9811059c | 26 | #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) |
047292d2 RS |
27 | #endif |
28 | ||
9811059c | 29 | #if TARGET_DEFAULT & MASK_68881 |
047292d2 RS |
30 | /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified. |
31 | This will control the use of inline 68881 insns in certain macros. */ | |
32 | ||
33 | #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}" | |
34 | ||
4239762d | 35 | /* If the 68881 is used, link must load libmc.a before libc.a. */ |
047292d2 | 36 | |
4239762d RS |
37 | #define LIB_SPEC "%{!msoft-float:%{!p:%{!pg:-lmc}}%{p:-lmc_p}%{pg:-lmc_p}} \ |
38 | %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} %{g:-lg}" | |
047292d2 RS |
39 | |
40 | #else | |
41 | /* Define __HAVE_68881__ in preprocessor if -m68881 is specified. | |
42 | This will control the use of inline 68881 insns in certain macros. */ | |
43 | ||
44 | #define CPP_SPEC "%{m68881:-D__HAVE_68881__}" | |
45 | ||
46 | /* If the 68881 is used, link must load libmc.a instead of libc.a */ | |
47 | ||
032b92e5 RS |
48 | #define LIB_SPEC "%{m68881:%{!p:%{!pg:-lmc}}%{p:-lmc_p}%{pg:-lmc_p}} \ |
49 | %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} %{g:-lg}" | |
047292d2 RS |
50 | #endif |
51 | ||
52 | /* Names to predefine in the preprocessor for this target machine. */ | |
53 | ||
65c42379 | 54 | #define CPP_PREDEFINES "-Dunix -Dmc68000 -Dis68k -Asystem(unix) -Asystem(bsd) -Acpu(m68k) -Amachine(m68k)" |
047292d2 RS |
55 | |
56 | /* This is BSD, so it wants DBX format. */ | |
57 | ||
58 | #define DBX_DEBUGGING_INFO | |
59 | ||
60 | /* Override parts of m68k.h to fit the ISI 68k machine. */ | |
61 | ||
62 | #undef FUNCTION_VALUE | |
63 | #undef LIBCALL_VALUE | |
64 | #undef FUNCTION_VALUE_REGNO_P | |
7972af82 | 65 | #undef NEEDS_UNTYPED_CALL |
047292d2 RS |
66 | #undef ASM_FILE_START |
67 | ||
118149af RS |
68 | /* Every structure or union's size must be a multiple of 2 bytes. */ |
69 | ||
70 | #define STRUCTURE_SIZE_BOUNDARY 16 | |
71 | ||
047292d2 RS |
72 | /* If TARGET_68881, return SF and DF values in f0 instead of d0. */ |
73 | ||
74 | #define FUNCTION_VALUE(VALTYPE,FUNC) LIBCALL_VALUE (TYPE_MODE (VALTYPE)) | |
75 | ||
76 | #define LIBCALL_VALUE(MODE) \ | |
c5c76735 | 77 | gen_rtx_REG ((MODE), ((TARGET_68881 && ((MODE) == SFmode || (MODE) == DFmode)) ? 16 : 0)) |
047292d2 RS |
78 | |
79 | /* 1 if N is a possible register number for a function value. | |
80 | D0 may be used, and F0 as well if -m68881 is specified. */ | |
81 | ||
82 | #define FUNCTION_VALUE_REGNO_P(N) \ | |
83 | ((N) == 0 || (TARGET_68881 && (N) == 16)) | |
84 | ||
7972af82 TW |
85 | /* Define this to be true when FUNCTION_VALUE_REGNO_P is true for |
86 | more than one register. */ | |
87 | ||
88 | #define NEEDS_UNTYPED_CALL 1 | |
89 | ||
047292d2 RS |
90 | /* Also output something to cause the correct _doprnt to be loaded. */ |
91 | #define ASM_FILE_START(FILE) fprintf (FILE, "#NO_APP\n%s\n", TARGET_68881 ? ".globl fltused" : "") |