(ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT):

Use hex if infinite, nan, or minus zero.

From-SVN: r4538
This commit is contained in:
Richard Stallman 1993-05-22 19:44:07 +00:00
parent 970491df96
commit e99300f131

View File

@ -1468,18 +1468,43 @@ literal_section () \
/* This is how to output an assembler line defining a `double' constant. */
#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
do { char dstr[30]; \
REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
fprintf (FILE, "\t.t_floating %s\n", dstr); \
} while (0)
{ \
if (REAL_VALUE_ISINF (VALUE) \
|| REAL_VALUE_ISNAN (VALUE) \
|| REAL_VALUE_MINUS_ZERO (VALUE)) \
{ \
long t[2]; \
REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
fprintf (FILE, "\t.quad 0x%lx%08lx\n", \
t[1] & 0xffffffff, t[0] & 0xffffffff); \
} \
else \
{ \
char str[30]; \
REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", str); \
fprintf (FILE, "\t.t_floating %s\n", str); \
} \
}
/* This is how to output an assembler line defining a `float' constant. */
#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
do { char dstr[30]; \
REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
fprintf (FILE, "\t.s_floating %s\n", dstr); \
} while (0)
{ \
if (REAL_VALUE_ISINF (VALUE) \
|| REAL_VALUE_ISNAN (VALUE) \
|| REAL_VALUE_MINUS_ZERO (VALUE)) \
{ \
long t; \
REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \
} \
else \
{ \
char str[30]; \
REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
fprintf (FILE, "\t.s_floating %s\n", str); \
} \
}
/* This is how to output an assembler line defining an `int' constant. */