summaryrefslogtreecommitdiffstats
path: root/gcc/config/m68k
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/m68k')
-rw-r--r--gcc/config/m68k/next.h67
-rw-r--r--gcc/config/m68k/sun2o4.h92
2 files changed, 124 insertions, 35 deletions
diff --git a/gcc/config/m68k/next.h b/gcc/config/m68k/next.h
index 60e9ad2813a..98b562da6b1 100644
--- a/gcc/config/m68k/next.h
+++ b/gcc/config/m68k/next.h
@@ -1,4 +1,5 @@
/* next.h: definitions for NeXT.
+Copyright (c) 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -185,29 +186,69 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef ASM_OUTPUT_DOUBLE
#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- (REAL_VALUE_ISINF ((VALUE)) \
- ? fprintf (FILE, "\t.double 0r%s99e999\n", ((VALUE) > 0 ? "" : "-")) \
- : fprintf (FILE, "\t.double 0r%.20e\n", (VALUE)))
+ do { if (REAL_VALUE_ISINF (VALUE)) \
+ { \
+ if (REAL_VALUE_NEGATIVE (VALUE)) \
+ fprintf (FILE, "\t.double 0r-99e999\n"); \
+ else \
+ fprintf (FILE, "\t.double 0r99e999\n"); \
+ } \
+ else \
+ { char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
+ fprintf (FILE, "\t.double 0r%s\n", dstr); \
+ } \
+ } while (0)
/* This is how to output an assembler line defining a `float' constant. */
#undef ASM_OUTPUT_FLOAT
#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- (REAL_VALUE_ISINF ((VALUE)) \
- ? fprintf (FILE, "\t.single 0r%s99e999\n", ((VALUE) > 0 ? "" : "-")) \
- : fprintf (FILE, "\t.single 0r%.20e\n", (VALUE)))
+ do { if (REAL_VALUE_ISINF (VALUE)) \
+ { \
+ if (REAL_VALUE_NEGATIVE (VALUE)) \
+ fprintf (FILE, "\t.single 0r-99e999\n"); \
+ else \
+ fprintf (FILE, "\t.single 0r99e999\n"); \
+ } \
+ else \
+ { char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
+ fprintf (FILE, "\t.single 0r%s\n", dstr); \
+ } \
+ } while (0)
#undef ASM_OUTPUT_FLOAT_OPERAND
-#define ASM_OUTPUT_FLOAT_OPERAND(FILE,VALUE) \
- (REAL_VALUE_ISINF ((VALUE)) \
- ? fprintf (FILE, "#0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
- : fprintf (FILE, "#0r%.9g", (VALUE)))
+#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
+ do{ if (REAL_VALUE_ISINF (VALUE)) \
+ { \
+ if (REAL_VALUE_NEGATIVE (VALUE)) \
+ fprintf (FILE, "#0r-99e999"); \
+ else \
+ fprintf (FILE, "#0r99e999"); \
+ } \
+ else \
+ { char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \
+ fprintf (FILE, "#0r%s", dstr); \
+ } \
+ } while (0)
#undef ASM_OUTPUT_DOUBLE_OPERAND
#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
- (REAL_VALUE_ISINF ((VALUE)) \
- ? fprintf (FILE, "#0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
- : fprintf (FILE, "#0r%.20g", (VALUE)))
+ do { if (REAL_VALUE_ISINF (VALUE)) \
+ { \
+ if (REAL_VALUE_NEGATIVE (VALUE)) \
+ fprintf (FILE, "#0r-99e999"); \
+ else \
+ fprintf (FILE, "#0r99e999"); \
+ } \
+ else \
+ { char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \
+ fprintf (FILE, "#0r%s", dstr); \
+ } \
+ } while (0)
#if 0 /* This is for system verson 3.0, which isn't out yet. */
#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
diff --git a/gcc/config/m68k/sun2o4.h b/gcc/config/m68k/sun2o4.h
index 9dbe9306d79..04b425e355f 100644
--- a/gcc/config/m68k/sun2o4.h
+++ b/gcc/config/m68k/sun2o4.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Sun 2 running Sunos 4.
- Copyright (C) 1987, 1988 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -97,34 +97,82 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef ASM_OUTPUT_DOUBLE
#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- (REAL_VALUE_ISINF ((VALUE)) \
- ? fprintf (FILE, "\t.double 0r%s99e999\n", ((VALUE) > 0 ? "" : "-")) \
- : REAL_VALUE_MINUS_ZERO ((VALUE)) \
- ? fprintf (FILE, "\t.long 0x80000000,0\n") \
- : fprintf (FILE, "\t.double 0r%.20e\n", (VALUE)))
+ do { if (REAL_VALUE_ISINF (VALUE)) \
+ { \
+ if (REAL_VALUE_NEGATIVE (VALUE)) \
+ fprintf (FILE, "\t.double 0r-99e999\n"); \
+ else \
+ fprintf (FILE, "\t.double 0r99e999\n"); \
+ } \
+ else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
+ { \
+ fprintf (FILE, "\t.long 0x80000000,0\n"); \
+ } \
+ else \
+ { char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
+ fprintf (FILE, "\t.double 0r%s\n", dstr); \
+ } \
+ } while (0)
/* This is how to output an assembler line defining a `float' constant. */
#undef ASM_OUTPUT_FLOAT
#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- (REAL_VALUE_ISINF ((VALUE)) \
- ? fprintf (FILE, "\t.single 0r%s99e999\n", ((VALUE) > 0 ? "" : "-")) \
- : REAL_VALUE_MINUS_ZERO ((VALUE)) \
- ? fprintf (FILE, "\t.long 0x80000000\n") \
- : fprintf (FILE, "\t.single 0r%.20e\n", (VALUE)))
+ do { if (REAL_VALUE_ISINF (VALUE)) \
+ { \
+ if (REAL_VALUE_NEGATIVE (VALUE)) \
+ fprintf (FILE, "\t.single 0r-99e999\n"); \
+ else \
+ fprintf (FILE, "\t.single 0r99e999\n"); \
+ } \
+ else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
+ { \
+ fprintf (FILE, "\t.long 0x80000000\n"); \
+ } \
+ else \
+ { char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
+ fprintf (FILE, "\t.single 0r%s\n", dstr); \
+ } \
+ } while (0)
#undef ASM_OUTPUT_FLOAT_OPERAND
-#define ASM_OUTPUT_FLOAT_OPERAND(FILE,VALUE) \
- (REAL_VALUE_ISINF ((VALUE)) \
- ? fprintf (FILE, "#0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
- : REAL_VALUE_MINUS_ZERO ((VALUE)) \
- ? fprintf (FILE, "#0r-0.0") \
- : fprintf (FILE, "#0r%.9g", (VALUE)))
+#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
+ do { if (REAL_VALUE_ISINF (VALUE)) \
+ { \
+ if (REAL_VALUE_NEGATIVE (VALUE)) \
+ fprintf (FILE, "#0r-99e999"); \
+ else \
+ fprintf (FILE, "#0r99e999"); \
+ } \
+ else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
+ { \
+ fprintf (FILE, "#0r-0.0"); \
+ } \
+ else \
+ { char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \
+ fprintf (FILE, "#0r%s", dstr); \
+ } \
+ } while (0)
#undef ASM_OUTPUT_DOUBLE_OPERAND
#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
- (REAL_VALUE_ISINF ((VALUE)) \
- ? fprintf (FILE, "#0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
- : REAL_VALUE_MINUS_ZERO ((VALUE)) \
- ? fprintf (FILE, "#0r-0.0") \
- : fprintf (FILE, "#0r%.20g", (VALUE)))
+ do { if (REAL_VALUE_ISINF (VALUE)) \
+ { \
+ if (REAL_VALUE_NEGATIVE (VALUE)) \
+ fprintf (FILE, "#0r-99e999"); \
+ else \
+ fprintf (FILE, "#0r99e999"); \
+ } \
+ else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
+ { \
+ fprintf (FILE, "#0r-0.0"); \
+ } \
+ else \
+ { char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \
+ fprintf (FILE, "#0r%s", dstr); \
+ } \
+ } while (0)
OpenPOWER on IntegriCloud