diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-07-07 16:55:27 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-07-07 16:55:27 -0700 |
commit | d667538bbfbe7ef11f1d79bbfac3ec6a36b24e6d (patch) | |
tree | c418cfc754712f2cc38c4d514f4c1b9ae5728c36 | |
parent | 15f67e0660ab655933ab4ca0006d41d6c43ad895 (diff) | |
download | gcc-d667538bbfbe7ef11f1d79bbfac3ec6a36b24e6d.zip gcc-d667538bbfbe7ef11f1d79bbfac3ec6a36b24e6d.tar.gz gcc-d667538bbfbe7ef11f1d79bbfac3ec6a36b24e6d.tar.bz2 |
(ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE):
Use REAL_VALUE_TO_DECIMAL to generate decimal string.
(REAL_ARITHMETIC): Define.
From-SVN: r4882
-rw-r--r-- | gcc/config/sparc/sparc.h | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 78b82c0..eb90e07 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -42,17 +42,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define CC1_SPEC "%{sun4:} %{target:}" -#if 0 -/* ??? This fails because REAL_VALUE_TYPE is `double' making it impossible to - represent and output `long double' constants. This causes problems during - a bootstrap with enquire/float.h, and hence must be disabled for now. - To fix, we need to implement code for TFmode just like the existing XFmode - support in real.[ch]. */ -/* Sparc ABI says that long double is 4 words. */ - -#define LONG_DOUBLE_TYPE_SIZE 128 -#endif - #define PTRDIFF_TYPE "int" /* In 2.4 it should work to delete this. #define SIZE_TYPE "int" */ @@ -169,6 +158,21 @@ extern int target_flags; /* target machine storage layout */ +#if 0 +/* ??? This fails because REAL_VALUE_TYPE is `double' making it impossible to + represent and output `long double' constants. This causes problems during + a bootstrap with enquire/float.h, and hence must be disabled for now. + To fix, we need to implement code for TFmode just like the existing XFmode + support in real.[ch]. */ +/* Define for support of TFmode long double and REAL_ARITHMETIC. + Sparc ABI says that long double is 4 words. */ +#define LONG_DOUBLE_TYPE_SIZE 128 +#endif + +/* Define for cross-compilation to a sparc target with no TFmode from a host + with a different float format (e.g. VAX). */ +#define REAL_ARITHMETIC + /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ #define BITS_BIG_ENDIAN 1 @@ -1621,7 +1625,11 @@ extern struct rtx_def *legitimize_pic_address (); ASM_LONG, t[0], ASM_LONG, t[1]); \ } \ else \ - fprintf (FILE, "\t.double 0r%.17g\n", VALUE); \ + { \ + char str[30]; \ + REAL_VALUE_TO_DECIMAL ((VALUE), "%.17g", str); \ + fprintf (FILE, "\t.double 0r%s\n", str); \ + } \ } /* This is how to output an assembler line defining a `float' constant. */ @@ -1637,7 +1645,11 @@ extern struct rtx_def *legitimize_pic_address (); fprintf (FILE, "\t%s\t0x%lx\n", ASM_LONG, t); \ } \ else \ - fprintf (FILE, "\t.single 0r%.9g\n", VALUE); \ + { \ + char str[30]; \ + REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", str); \ + fprintf (FILE, "\t.single 0r%s\n", str); \ + } \ } /* This is how to output an assembler line defining a `long double' |