diff options
author | Richard Stallman <rms@gnu.org> | 1992-05-28 18:42:45 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-05-28 18:42:45 +0000 |
commit | e1c8af5cf35ab345c43fe360e9031f57e222ab8e (patch) | |
tree | 299bc4ed5034fffbb3aaf1cb17c0cbbf72652313 /gcc | |
parent | 4f529f0a6e2833e74da8ebdfc55f9800ea30284a (diff) | |
download | gcc-e1c8af5cf35ab345c43fe360e9031f57e222ab8e.zip gcc-e1c8af5cf35ab345c43fe360e9031f57e222ab8e.tar.gz gcc-e1c8af5cf35ab345c43fe360e9031f57e222ab8e.tar.bz2 |
entered into RCS
From-SVN: r1113
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/sparc/sysv4.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h index 7517c3d..d685c92 100644 --- a/gcc/config/sparc/sysv4.h +++ b/gcc/config/sparc/sysv4.h @@ -179,3 +179,35 @@ do { ASM_OUTPUT_ALIGN ((FILE), 2); \ else \ c = getc (FILE); \ } while (1) + +/* If the host and target formats match, output the floats as hex. */ +#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT +#if defined (HOST_WORDS_BIG_ENDIAN) == WORDS_BIG_ENDIAN + +/* This is how to output assembly code to define a `float' constant. + We always have to use a .long pseudo-op to do this because the native + SVR4 ELF assembler is buggy and it generates incorrect values when we + try to use the .float pseudo-op instead. */ + +#undef ASM_OUTPUT_FLOAT +#define ASM_OUTPUT_FLOAT(FILE,VALUE) \ +do { long value; \ + REAL_VALUE_TO_TARGET_SINGLE ((VALUE), value); \ + fprintf((FILE), "\t.long\t0x%x\n", value); \ + } while (0) + +/* This is how to output assembly code to define a `double' constant. + We always have to use a pair of .long pseudo-ops to do this because + the native SVR4 ELF assembler is buggy and it generates incorrect + values when we try to use the the .double pseudo-op instead. */ + +#undef ASM_OUTPUT_DOUBLE +#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ +do { long value[2]; \ + REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), value); \ + fprintf((FILE), "\t.long\t0x%x\n", value[0]); \ + fprintf((FILE), "\t.long\t0x%x\n", value[1]); \ + } while (0) + +#endif /* word order matches */ +#endif /* HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT */ |