From: Richard Stallman Date: Sat, 22 May 1993 19:44:07 +0000 (+0000) Subject: (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e99300f131ee799843c61b63399c16fe14768e5b;p=gcc.git (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Use hex if infinite, nan, or minus zero. From-SVN: r4538 --- diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 7437fcca814..594b9ffc662 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -1467,19 +1467,44 @@ 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) +#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ + { \ + 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) +#define ASM_OUTPUT_FLOAT(FILE,VALUE) \ + { \ + 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. */