|
|
1.1 root 1: /* Definitions of target machine for GNU compiler. Altos 3068 68020 version.
2: Copyright (C) 1988, 1989, 1993 Free Software Foundation, Inc.
3:
4: Written by Jyrki Kuoppala <[email protected]>
5: Last modified: Mon Mar 6 22:47:58 1989
6:
7: This file is part of GNU CC.
8:
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)
12: any later version.
13:
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.
18:
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
1.1.1.3 ! root 21: the Free Software Foundation, 59 Temple Place - Suite 330,
! 22: Boston, MA 02111-1307, USA. */
1.1 root 23:
24:
25: #include "m68k/m68k.h"
26:
27: /* See m68k.h. 7 means 68020 with 68881. */
28: /* 5 is without 68881. Change to 7 if you have 68881 */
29:
30: #ifndef TARGET_DEFAULT
31: #define TARGET_DEFAULT 5
32:
33: /* Don't try using XFmode. */
34: #undef LONG_DOUBLE_TYPE_SIZE
35: #define LONG_DOUBLE_TYPE_SIZE 64
36: #endif
37:
38: /* Define __HAVE_68881__ in preprocessor,
39: according to the -m flags.
40: This will control the use of inline 68881 insns in certain macros.
41: Also inform the program which CPU this is for. */
42:
43: #if TARGET_DEFAULT & 02
44:
45: /* -m68881 is the default */
46: #define CPP_SPEC \
47: "%{!msoft-float:-D__HAVE_68881__ }\
48: %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
49:
50: #else
51:
52: /* -msoft-float is the default */
53: #define CPP_SPEC \
54: "%{m68881:-D__HAVE_68881__ }\
55: %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
56:
57: #endif
58:
59: /* -m68000 requires special flags to the assembler. */
60:
61: #define ASM_SPEC \
62: "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
63:
64: /* Names to predefine in the preprocessor for this target machine. */
65:
1.1.1.2 root 66: #define CPP_PREDEFINES "-Dmc68000 -DPORTAR -Dmc68k32 -Uvax -Dm68k -Dunix -Asystem(unix) -Acpu(m68k) -Amachine(m68k)"
1.1 root 67:
68: /* Every structure or union's size must be a multiple of 2 bytes. */
69:
70: #define STRUCTURE_SIZE_BOUNDARY 16
71:
72: /* Generate calls to memcpy, memcmp and memset. */
73: #define TARGET_MEM_FUNCTIONS
74:
75: /* We use gnu assembler, linker and gdb, so we want DBX format. */
76:
77: #define DBX_DEBUGGING_INFO
78:
79: /* Tell some conditionals we will use GAS. Is this really used? */
80:
81: #define USE_GAS
82:
83: /* This is how to output an assembler line defining a `double' constant. */
84:
85: #undef ASM_OUTPUT_DOUBLE
86: #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
87: do { char dstr[30]; \
88: REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
89: fprintf (FILE, "\t.double 0r%s\n", dstr); \
90: } while (0)
91:
92: /* This is how to output an assembler line defining a `float' constant. */
93:
94: #undef ASM_OUTPUT_FLOAT
95: #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
96: do { char dstr[30]; \
97: REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
98: fprintf (FILE, "\t.single 0r%s\n", dstr); \
99: } while (0)
100:
101: #undef ASM_OUTPUT_FLOAT_OPERAND
102: #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
103: do { \
104: if (CODE == 'f') \
105: { \
106: char dstr[30]; \
107: REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \
108: fprintf (FILE, "#0r%s", dstr); \
109: } \
110: else \
111: { \
112: long l; \
113: REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
114: if (sizeof (int) == sizeof (long)) \
115: asm_fprintf ((FILE), "%I0x%x", l); \
116: else \
117: asm_fprintf ((FILE), "%I0x%lx", l); \
118: } \
119: } while (0)
120:
121: #undef ASM_OUTPUT_DOUBLE_OPERAND
122: #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
123: do { char dstr[30]; \
124: REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
125: fprintf (FILE, "#0r%s", dstr); \
126: } while (0)
127:
128: /* Return pointer values in both d0 and a0. */
129:
130: #undef FUNCTION_EXTRA_EPILOGUE
131: #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \
132: { \
133: extern int current_function_returns_pointer; \
134: if ((current_function_returns_pointer) && \
135: ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode))\
136: fprintf (FILE, "\tmovel d0,a0\n"); \
137: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.