From: Richard Stallman Date: Thu, 28 May 1992 18:42:45 +0000 (+0000) Subject: entered into RCS X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1c8af5cf35ab345c43fe360e9031f57e222ab8e;p=gcc.git entered into RCS From-SVN: r1113 --- diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h index 7517c3db0ea..d685c92130b 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 */