|
|
1.1 ! root 1: /* Target definitions for GNU compiler for mc680x0 running NeXTSTEP 2.1 ! 2: Copyright (C) 1989, 90, 91, 92, 93, 1994 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: /* Changed for NeXTStep2.1, Ch. Kranz, 2/94, 3/94 */ ! 21: ! 22: #include "m68k/next.h" ! 23: #include "nextstep21.h" ! 24: ! 25: /* for #include <mach.h> in libgcc2.c */ ! 26: #define NeXTStep21 ! 27: ! 28: #undef ASM_OUTPUT_DOUBLE ! 29: #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ ! 30: do { if (REAL_VALUE_ISINF (VALUE)) \ ! 31: { \ ! 32: if (REAL_VALUE_NEGATIVE (VALUE)) \ ! 33: fprintf (FILE, "#0r-99e999"); \ ! 34: else \ ! 35: fprintf (FILE, "#0r99e999"); \ ! 36: } \ ! 37: else \ ! 38: { char dstr[30]; \ ! 39: REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \ ! 40: fprintf (FILE, "\t.double 0r%s\n", dstr); \ ! 41: } \ ! 42: } while (0) ! 43: ! 44: /* This is how to output an assembler line defining a `float' constant. */ ! 45: #undef ASM_OUTPUT_FLOAT ! 46: #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ ! 47: do { if (REAL_VALUE_ISINF (VALUE)) \ ! 48: { \ ! 49: if (REAL_VALUE_NEGATIVE (VALUE)) \ ! 50: fprintf (FILE, "\t.single 0r-99e999\n"); \ ! 51: else \ ! 52: fprintf (FILE, "\t.single 0r99e999\n"); \ ! 53: } \ ! 54: else \ ! 55: { char dstr[30]; \ ! 56: REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \ ! 57: fprintf (FILE, "\t.single 0r%s\n", dstr); \ ! 58: } \ ! 59: } while (0) ! 60: ! 61: /* called from m68k.c line 1881 */ ! 62: #undef ASM_OUTPUT_FLOAT_OPERAND ! 63: #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ ! 64: do{ \ ! 65: if (CODE != 'f') \ ! 66: { \ ! 67: long l; \ ! 68: REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ ! 69: if (sizeof (int) == sizeof (long)) \ ! 70: asm_fprintf ((FILE), "%I0x%x", l); \ ! 71: else \ ! 72: asm_fprintf ((FILE), "%I0x%lx", l); \ ! 73: } \ ! 74: else if (REAL_VALUE_ISINF (VALUE)) \ ! 75: { \ ! 76: if (REAL_VALUE_NEGATIVE (VALUE)) \ ! 77: fprintf (FILE, "#0r-99e999"); \ ! 78: else \ ! 79: fprintf (FILE, "#0r99e999"); \ ! 80: } \ ! 81: else \ ! 82: { char dstr[30]; \ ! 83: REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \ ! 84: fprintf (FILE, "#0r%s", dstr); \ ! 85: } \ ! 86: } while (0) ! 87: ! 88: #undef ASM_OUTPUT_DOUBLE_OPERAND ! 89: #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ ! 90: do { if (REAL_VALUE_ISINF (VALUE)) \ ! 91: { \ ! 92: if (REAL_VALUE_NEGATIVE (VALUE)) \ ! 93: fprintf (FILE, "#0r-99e999"); \ ! 94: else \ ! 95: fprintf (FILE, "#0r99e999"); \ ! 96: } \ ! 97: else \ ! 98: { char dstr[30]; \ ! 99: REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \ ! 100: fprintf (FILE, "#0r%s", dstr); \ ! 101: } \ ! 102: } while (0) ! 103:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.