1 /* Target definitions for GNU compiler for mc680x0 running NeXTSTEP 2.1
2 Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994
3 Free Software Foundation, Inc.
5 This file is part of GNU CC.
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)
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.
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
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* Changed for NeXTStep2.1, Ch. Kranz, 2/94, 3/94 */
24 #include "m68k/next.h"
25 #include "nextstep21.h"
27 /* for #include <mach.h> in libgcc2.c */
30 #undef ASM_OUTPUT_DOUBLE
31 #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
32 do { if (REAL_VALUE_ISINF (VALUE)) \
34 if (REAL_VALUE_NEGATIVE (VALUE)) \
35 fprintf (FILE, "#0r-99e999"); \
37 fprintf (FILE, "#0r99e999"); \
41 REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
42 fprintf (FILE, "\t.double 0r%s\n", dstr); \
46 /* This is how to output an assembler line defining a `float' constant. */
47 #undef ASM_OUTPUT_FLOAT
48 #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
49 do { if (REAL_VALUE_ISINF (VALUE)) \
51 if (REAL_VALUE_NEGATIVE (VALUE)) \
52 fprintf (FILE, "\t.single 0r-99e999\n"); \
54 fprintf (FILE, "\t.single 0r99e999\n"); \
58 REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
59 fprintf (FILE, "\t.single 0r%s\n", dstr); \
63 /* called from m68k.c line 1881 */
64 #undef ASM_OUTPUT_FLOAT_OPERAND
65 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
70 REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
71 if (sizeof (int) == sizeof (long)) \
72 asm_fprintf ((FILE), "%I0x%x", l); \
74 asm_fprintf ((FILE), "%I0x%lx", l); \
76 else if (REAL_VALUE_ISINF (VALUE)) \
78 if (REAL_VALUE_NEGATIVE (VALUE)) \
79 fprintf (FILE, "#0r-99e999"); \
81 fprintf (FILE, "#0r99e999"); \
85 REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \
86 fprintf (FILE, "#0r%s", dstr); \
90 #undef ASM_OUTPUT_DOUBLE_OPERAND
91 #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
92 do { if (REAL_VALUE_ISINF (VALUE)) \
94 if (REAL_VALUE_NEGATIVE (VALUE)) \
95 fprintf (FILE, "#0r-99e999"); \
97 fprintf (FILE, "#0r99e999"); \
101 REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \
102 fprintf (FILE, "#0r%s", dstr); \