|
|
1.1 ! root 1: /* Definitions of target machine for GNU compiler. Sun 2 running Sunos 4. ! 2: Copyright (C) 1987, 1988, 1993 Free Software Foundation, Inc. ! 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/sun2.h" ! 21: ! 22: ! 23: /* Define __HAVE_SKY__ in preprocessor, according to the -m flags. ! 24: Also inform the program which CPU this is for. */ ! 25: ! 26: #undef CPP_SPEC ! 27: ! 28: #undef PTRDIFF_TYPE ! 29: #define PTRDIFF_TYPE "int" ! 30: #undef SIZE_TYPE ! 31: #define SIZE_TYPE "int" ! 32: #undef WCHAR_TYPE ! 33: #define WCHAR_TYPE "short unsigned int" ! 34: #undef WCHAR_TYPE_SIZE ! 35: #define WCHAR_TYPE_SIZE 16 ! 36: ! 37: #if TARGET_DEFAULT & 0200 ! 38: ! 39: /* -msky is the default */ ! 40: #define CPP_SPEC \ ! 41: "%{!msoft-float:-D__HAVE_SKY__}\ ! 42: %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{!mc68020:%{!m68020:-Dmc68010}}}" ! 43: ! 44: #else ! 45: ! 46: /* -msoft-float is the default */ ! 47: #define CPP_SPEC \ ! 48: "%{msky:-D__HAVE_SKY__ }\ ! 49: %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{!mc68020:%{!m68020:-Dmc68010}}}" ! 50: ! 51: #endif ! 52: ! 53: /* STARTFILE_SPEC to include sun floating point initialization ! 54: This is necessary (tr: Sun does it) for the sky routines. ! 55: I'm not sure what would happen below if people gave contradictory ! 56: arguments (eg. -msoft-float -mfpa) */ ! 57: ! 58: #undef STARTFILE_SPEC ! 59: ! 60: #if TARGET_DEFAULT & 0200 ! 61: /* -msky is the default */ ! 62: #define STARTFILE_SPEC \ ! 63: "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}} \ ! 64: %{msoft-float:Fcrt1.o%s} \ ! 65: %{!msoft-float:Scrt1.o%s}" ! 66: #else ! 67: /* -msoft-float is the default */ ! 68: #define STARTFILE_SPEC \ ! 69: "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}} \ ! 70: %{msky:Scrt1.o%s} \ ! 71: %{!msky:Fcrt1.o%s}" ! 72: #endif ! 73: ! 74: /* Specify library to handle `-a' basic block profiling. ! 75: Control choice of libm.a (if user says -lm) ! 76: based on fp arith default and options. */ ! 77: ! 78: #undef LIB_SPEC ! 79: ! 80: #if TARGET_DEFAULT & 0200 ! 81: /* -msky is the default */ ! 82: #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \ ! 83: %{a:/usr/lib/bb_link.o -lc} %{g:-lg} \ ! 84: %{msoft-float:-L/usr/lib/fsoft} \ ! 85: %{!msoft_float:-L/usr/lib/fsky}" ! 86: #else ! 87: /* -msoft-float is the default */ ! 88: #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \ ! 89: %{a:/usr/lib/bb_link.o -lc} %{g:-lg} \ ! 90: %{!msky:-L/usr/lib/fsoft} \ ! 91: %{msky:-L/usr/lib/ffpa}" ! 92: #endif ! 93: ! 94: #undef LINK_SPEC ! 95: #define LINK_SPEC \ ! 96: "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic}" ! 97: ! 98: #undef ASM_OUTPUT_DOUBLE ! 99: #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ ! 100: do { if (REAL_VALUE_ISINF (VALUE)) \ ! 101: { \ ! 102: if (REAL_VALUE_NEGATIVE (VALUE)) \ ! 103: fprintf (FILE, "\t.double 0r-99e999\n"); \ ! 104: else \ ! 105: fprintf (FILE, "\t.double 0r99e999\n"); \ ! 106: } \ ! 107: else if (REAL_VALUE_MINUS_ZERO (VALUE)) \ ! 108: { \ ! 109: fprintf (FILE, "\t.long 0x80000000,0\n"); \ ! 110: } \ ! 111: else \ ! 112: { char dstr[30]; \ ! 113: REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \ ! 114: fprintf (FILE, "\t.double 0r%s\n", dstr); \ ! 115: } \ ! 116: } while (0) ! 117: ! 118: /* This is how to output an assembler line defining a `float' constant. */ ! 119: ! 120: #undef ASM_OUTPUT_FLOAT ! 121: #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ ! 122: do { if (REAL_VALUE_ISINF (VALUE)) \ ! 123: { \ ! 124: if (REAL_VALUE_NEGATIVE (VALUE)) \ ! 125: fprintf (FILE, "\t.single 0r-99e999\n"); \ ! 126: else \ ! 127: fprintf (FILE, "\t.single 0r99e999\n"); \ ! 128: } \ ! 129: else if (REAL_VALUE_MINUS_ZERO (VALUE)) \ ! 130: { \ ! 131: fprintf (FILE, "\t.long 0x80000000\n"); \ ! 132: } \ ! 133: else \ ! 134: { char dstr[30]; \ ! 135: REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \ ! 136: fprintf (FILE, "\t.single 0r%s\n", dstr); \ ! 137: } \ ! 138: } while (0) ! 139: ! 140: #undef ASM_OUTPUT_FLOAT_OPERAND ! 141: #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ ! 142: do { \ ! 143: if (CODE != 'f') \ ! 144: { \ ! 145: long l; \ ! 146: REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ ! 147: if (sizeof (int) == sizeof (long)) \ ! 148: asm_fprintf ((FILE), "%I0x%x", l); \ ! 149: else \ ! 150: asm_fprintf ((FILE), "%I0x%lx", l); \ ! 151: } \ ! 152: else if (REAL_VALUE_ISINF (VALUE)) \ ! 153: { \ ! 154: if (REAL_VALUE_NEGATIVE (VALUE)) \ ! 155: fprintf (FILE, "#0r-99e999"); \ ! 156: else \ ! 157: fprintf (FILE, "#0r99e999"); \ ! 158: } \ ! 159: else if (REAL_VALUE_MINUS_ZERO (VALUE)) \ ! 160: { \ ! 161: fprintf (FILE, "#0r-0.0"); \ ! 162: } \ ! 163: else \ ! 164: { char dstr[30]; \ ! 165: REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \ ! 166: fprintf (FILE, "#0r%s", dstr); \ ! 167: } \ ! 168: } while (0) ! 169: ! 170: #undef ASM_OUTPUT_DOUBLE_OPERAND ! 171: #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ ! 172: do { if (REAL_VALUE_ISINF (VALUE)) \ ! 173: { \ ! 174: if (REAL_VALUE_NEGATIVE (VALUE)) \ ! 175: fprintf (FILE, "#0r-99e999"); \ ! 176: else \ ! 177: fprintf (FILE, "#0r99e999"); \ ! 178: } \ ! 179: else if (REAL_VALUE_MINUS_ZERO (VALUE)) \ ! 180: { \ ! 181: fprintf (FILE, "#0r-0.0"); \ ! 182: } \ ! 183: else \ ! 184: { char dstr[30]; \ ! 185: REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \ ! 186: fprintf (FILE, "#0r%s", dstr); \ ! 187: } \ ! 188: } while (0)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.