|
|
1.1 root 1: /* Definitions of target machine for GNU compiler. Apollo 680X0 version. 1.1.1.2 ! root 2: Copyright (C) 1989,1992 Free Software Foundation, Inc. 1.1 root 3: 4: This file is part of GNU CC. 5: 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) 9: any later version. 10: 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. 15: 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ 19: 20: #include "m68k.h" 21: 22: /* This symbol may be tested in other files for special Apollo handling */ 23: 24: #define TM_APOLLO 25: 26: /* See m68k.h. 7 means 68020 with 68881. */ 27: 28: #ifndef TARGET_DEFAULT 29: #define TARGET_DEFAULT 7 30: #endif 31: 32: /* Target switches for the Apollo is the same as in m68k.h, except 33: there is no Sun FPA. */ 34: 35: #undef TARGET_SWITCHES 36: #define TARGET_SWITCHES \ 37: { { "68020", 5}, \ 38: { "c68020", 5}, \ 39: { "68881", 2}, \ 40: { "bitfield", 4}, \ 41: { "68000", -5}, \ 42: { "c68000", -5}, \ 43: { "soft-float", -0102}, \ 44: { "nobitfield", -4}, \ 45: { "rtd", 8}, \ 46: { "nortd", -8}, \ 47: { "short", 040}, \ 48: { "noshort", -040}, \ 49: { "", TARGET_DEFAULT}} 50: 51: /* Define __HAVE_68881__ in preprocessor, 52: according to the -m flags. 53: This will control the use of inline 68881 insns in certain macros. 54: Also inform the program which CPU this is for. */ 55: 56: #if TARGET_DEFAULT & 02 57: 58: /* -m68881 is the default */ 59: #define CPP_SPEC \ 60: "%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}\ 61: %{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\ 62: %{!ansi:-D_APOLLO_SOURCE}}" 63: 64: #else 65: 66: /* -msoft-float is the default */ 67: #define CPP_SPEC \ 68: "%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\ 69: %{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\ 70: %{!ansi:-D_APOLLO_SOURCE}}" 71: 72: #endif 73: 74: /* Names to predefine in the preprocessor for this target machine. */ 75: /* These are the ones defined by Apollo, plus mc68000 for uniformity with 76: GCC on other 68000 systems. */ 77: 78: #define CPP_PREDEFINES "-Dapollo -Daegis -Dunix" 79: 80: /* cpp has to support a #sccs directive for the /usr/include files */ 81: 82: #define SCCS_DIRECTIVE 83: 84: /* Allow #ident but output nothing for it. */ 85: 86: #define IDENT_DIRECTIVE 87: #define ASM_OUTPUT_IDENT(FILE, NAME) 88: 89: /* Allow dollarsigns in identifiers */ 90: 91: #define DOLLARS_IN_IDENTIFIERS 2 92: 1.1.1.2 ! root 93: /* -m68000 requires special flags to the assembler. */ 1.1 root 94: 95: #define ASM_SPEC \ 1.1.1.2 ! root 96: "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}" 1.1 root 97: 98: /* STARTFILE_SPEC 99: Note that includes knowledge of the default specs for gcc, ie. no 100: args translates to the same effect as -m68881 */ 101: 102: #if TARGET_DEFAULT & 2 103: /* -m68881 is the default */ 104: #define STARTFILE_SPEC \ 105: "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" 106: #else 107: /* -msoft-float is the default */ 108: #define STARTFILE_SPEC \ 109: "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" 110: #endif 111: 112: /* Specify library to handle `-a' basic block profiling. */ 113: 114: #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \ 115: %{a:/usr/lib/bb_link.o} " 116: 117: /* Debugging is not supported yet */ 118: 119: #undef DBX_DEBUGGING_INFO 120: #undef SDB_DEBUGGING_INFO 121: 1.1.1.2 ! root 122: /* We have atexit(2). So C++ can use it for global destructors. */ ! 123: ! 124: #define HAVE_ATEXIT ! 125: 1.1 root 126: /* Every structure or union's size must be a multiple of 2 bytes. */ 127: 128: #define STRUCTURE_SIZE_BOUNDARY 16 129: 1.1.1.2 ! root 130: /* Boundary (in *bits*) on which stack pointer should be aligned. */ ! 131: #undef STACK_BOUNDARY ! 132: #define STACK_BOUNDARY 32 ! 133: 1.1 root 134: /* Functions which return large structures get the address 1.1.1.2 ! root 135: to place the wanted value from a hidden parameter. */ 1.1 root 136: 137: #undef PCC_STATIC_STRUCT_RETURN 138: #undef STRUCT_VALUE_REGNUM 139: #define STRUCT_VALUE 0 1.1.1.2 ! root 140: #define STRUCT_VALUE_INCOMING 0 1.1 root 141: 142: /* Specify how to pad function arguments. 143: Arguments are not padded at all; the stack is kept aligned on long 144: boundaries. */ 145: 146: #define FUNCTION_ARG_PADDING(mode, size) none 147: 148: /* The definition of this macro imposes a limit on the size of 149: an aggregate object which can be treated as if it were a scalar 1.1.1.2 ! root 150: object. */ 1.1 root 151: 152: #define MAX_FIXED_MODE_SIZE BITS_PER_WORD 153: 154: /* The definition of this macro implies that there are cases where 155: a scalar value cannot be returned in registers. 156: For Apollo, anything larger than one integer register is returned 157: using the structure-value mechanism, i.e. objects of DFmode are 158: returned that way. */ 159: 160: #define RETURN_IN_MEMORY(type) \ 161: (GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD) 162: 1.1.1.2 ! root 163: /* In order to link with Apollo libraries, we can't prefix external ! 164: symbols with an underscore. */ ! 165: ! 166: #undef USER_LABEL_PREFIX ! 167: ! 168: /* Use a prefix for local labels, just to be on the save side. */ ! 169: ! 170: #undef LOCAL_LABEL_PREFIX ! 171: #define LOCAL_LABEL_PREFIX "." ! 172: ! 173: /* Use a register prefix to avoid clashes with external symbols (classic ! 174: example: `extern char PC;' in termcap). */ ! 175: ! 176: #undef REGISTER_PREFIX ! 177: #define REGISTER_PREFIX "%" ! 178: ! 179: /* In the machine description we can't use %R, because it will not be seen ! 180: by ASM_FPRINTF. (Isn't that a design bug?). */ ! 181: ! 182: #undef REGISTER_PREFIX_MD ! 183: #define REGISTER_PREFIX_MD "%%" ! 184: ! 185: /* config/m68k.md has an explicit reference to the program counter, ! 186: prefix this by the register prefix. */ ! 187: ! 188: #define ASM_RETURN_CASE_JUMP return "jmp %%pc@(2,%0:w)" ! 189: 1.1 root 190: 1.1.1.2 ! root 191: /* Here are the new register names. */ 1.1 root 192: 1.1.1.2 ! root 193: #undef REGISTER_NAMES ! 194: #ifndef SUPPORT_SUN_FPA ! 195: #define REGISTER_NAMES \ ! 196: {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ ! 197: "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \ ! 198: "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" } ! 199: #else /* SUPPORTED_SUN_FPA */ ! 200: #define REGISTER_NAMES \ ! 201: {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ ! 202: "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \ ! 203: "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \ ! 204: "%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6", "%fpa7", \ ! 205: "%fpa8", "%fpa9", "%fpa10", "%fpa11", "%fpa12", "%fpa13", "%fpa14", "%fpa15", \ ! 206: "%fpa16", "%fpa17", "%fpa18", "%fpa19", "%fpa20", "%fpa21", "%fpa22", "%fpa23", \ ! 207: "%fpa24", "%fpa25", "%fpa26", "%fpa27", "%fpa28", "%fpa29", "%fpa30", "%fpa31" } ! 208: #endif /* defined SUPPORT_SUN_FPA */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.