* varasm.c (assemble_real): Use REAL_VALUE_TO_x and assemble_integer
[official-gcc.git] / gcc / config / m68k / next21.h
blobb4d8aee8eeb3fa3e9f2cb8c09ec4a929e8030150
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)
10 any later version.
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 */
28 #define NeXTStep21
30 /* called from m68k.c line 1881 */
31 #undef ASM_OUTPUT_FLOAT_OPERAND
32 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
33 do{ \
34 if (CODE != 'f') \
35 { \
36 long l; \
37 REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
38 if (sizeof (int) == sizeof (long)) \
39 asm_fprintf ((FILE), "%I0x%x", (int) l); \
40 else \
41 asm_fprintf ((FILE), "%I0x%lx", l); \
42 } \
43 else if (REAL_VALUE_ISINF (VALUE)) \
44 { \
45 if (REAL_VALUE_NEGATIVE (VALUE)) \
46 fprintf (FILE, "#0r-99e999"); \
47 else \
48 fprintf (FILE, "#0r99e999"); \
49 } \
50 else \
51 { char dstr[30]; \
52 REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \
53 fprintf (FILE, "#0r%s", dstr); \
54 } \
55 } while (0)
57 #undef ASM_OUTPUT_DOUBLE_OPERAND
58 #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
59 do { if (REAL_VALUE_ISINF (VALUE)) \
60 { \
61 if (REAL_VALUE_NEGATIVE (VALUE)) \
62 fprintf (FILE, "#0r-99e999"); \
63 else \
64 fprintf (FILE, "#0r99e999"); \
65 } \
66 else \
67 { char dstr[30]; \
68 REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \
69 fprintf (FILE, "#0r%s", dstr); \
70 } \
71 } while (0)