OSDN Git Service

960bcf351e942bed64e2653dac731fa0bcd89c1d
[pf3gnuchains/gcc-fork.git] / gcc / config / m68k / next21.h
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.
4
5 This file is part of GNU CC.
6
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)
10 any later version.
11
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.
16
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.  */
21
22 /* Changed for NeXTStep2.1, Ch. Kranz, 2/94, 3/94 */
23
24 #include "m68k/next.h"
25 #include "nextstep21.h"
26
27 /* for #include <mach.h> in libgcc2.c */
28 #define NeXTStep21      
29
30 #undef  ASM_OUTPUT_DOUBLE
31 #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                                   \
32  do { if (REAL_VALUE_ISINF (VALUE))                                     \
33         {                                                               \
34           if (REAL_VALUE_NEGATIVE (VALUE))                              \
35             fprintf (FILE, "#0r-99e999");                               \
36           else                                                          \
37             fprintf (FILE, "#0r99e999");                                \
38         }                                                               \
39       else                                                              \
40         { char dstr[30];                                                \
41           REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr);               \
42           fprintf (FILE, "\t.double 0r%s\n", dstr);                     \
43         }                                                               \
44     } while (0)
45
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))                                     \
50         {                                                               \
51           if (REAL_VALUE_NEGATIVE (VALUE))                              \
52             fprintf (FILE, "\t.single 0r-99e999\n");                    \
53           else                                                          \
54             fprintf (FILE, "\t.single 0r99e999\n");                     \
55         }                                                               \
56       else                                                              \
57         { char dstr[30];                                                \
58           REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr);               \
59           fprintf (FILE, "\t.single 0r%s\n", dstr);                     \
60         }                                                               \
61     } while (0)
62
63 /* called from m68k.c line 1881 */
64 #undef  ASM_OUTPUT_FLOAT_OPERAND
65 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)               \
66   do{                                                           \
67       if (CODE != 'f')                                          \
68         {                                                       \
69           long l;                                               \
70           REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);               \
71           if (sizeof (int) == sizeof (long))                    \
72             asm_fprintf ((FILE), "%I0x%x", l);                  \
73           else                                                  \
74             asm_fprintf ((FILE), "%I0x%lx", l);                 \
75         }                                                       \
76       else if (REAL_VALUE_ISINF (VALUE))                        \
77         {                                                       \
78           if (REAL_VALUE_NEGATIVE (VALUE))                      \
79             fprintf (FILE, "#0r-99e999");                       \
80           else                                                  \
81             fprintf (FILE, "#0r99e999");                        \
82         }                                                       \
83       else                                                      \
84         { char dstr[30];                                        \
85           REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr);        \
86           fprintf (FILE, "#0r%s", dstr);                        \
87         }                                                       \
88     } while (0)
89
90 #undef  ASM_OUTPUT_DOUBLE_OPERAND
91 #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)                           \
92  do { if (REAL_VALUE_ISINF (VALUE))                                     \
93         {                                                               \
94           if (REAL_VALUE_NEGATIVE (VALUE))                              \
95             fprintf (FILE, "#0r-99e999");                               \
96           else                                                          \
97             fprintf (FILE, "#0r99e999");                                \
98         }                                                               \
99       else                                                              \
100        { char dstr[30];                                                 \
101           REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr);               \
102           fprintf (FILE, "#0r%s", dstr);                                \
103        }                                                                \
104     } while (0)
105