diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 1994-12-27 20:11:06 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 1994-12-27 20:11:06 +0000 |
commit | bd657ba5ce73580e35317e3ca10e1d85dc8a7351 (patch) | |
tree | d5b6193f05040d54fdfbd474ca3876d8ab38a3d1 /gcc | |
parent | fb2f482870e1fb8d64704f15c52ef636957a1975 (diff) | |
download | gcc-bd657ba5ce73580e35317e3ca10e1d85dc8a7351.zip gcc-bd657ba5ce73580e35317e3ca10e1d85dc8a7351.tar.gz gcc-bd657ba5ce73580e35317e3ca10e1d85dc8a7351.tar.bz2 |
Use REAL_VALUE_TO_TARGET_{DOUBLE,SINGLE} to print float values
From-SVN: r8692
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/i960/i960.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c index a0ac218..7e6f97a 100644 --- a/gcc/config/i960/i960.c +++ b/gcc/config/i960/i960.c @@ -2104,6 +2104,13 @@ i960_output_double (file, value) FILE *file; double value; { +#ifdef REAL_VALUE_TO_TARGET_DOUBLE + long value_long[2]; + REAL_VALUE_TO_TARGET_DOUBLE (value, value_long); + + fprintf (stream, "\t.word\t0x%08lx\t\t# %.20g\n\t.word\t0x%08lx\n", + value_long[0], value, value_long[1]); +#else if (REAL_VALUE_ISINF (value)) { fprintf (file, "\t.word 0\n"); @@ -2111,6 +2118,7 @@ i960_output_double (file, value) } else fprintf (file, "\t.double 0d%.17e\n", (value)); +#endif } void @@ -2118,10 +2126,17 @@ i960_output_float (file, value) FILE *file; double value; { +#ifdef REAL_VALUE_TO_TARGET_SINGLE + long value_long; + REAL_VALUE_TO_TARGET_SINGLE (value, value_long); + + fprintf (stream, "\t.word\t0x%08lx\t\t# %.12g (float)\n", value_long, value); +#else if (REAL_VALUE_ISINF (value)) fprintf (file, "\t.word 0x7f800000 # Infinity\n"); else fprintf (file, "\t.float 0f%.12e\n", (value)); +#endif } /* Return the number of bits that an object of size N bytes is aligned to. */ |