aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-07-21 12:28:08 -0700
committerJim Wilson <wilson@gcc.gnu.org>1992-07-21 12:28:08 -0700
commit2d6fda9cee388788c1b84fe055cc426e53fe8166 (patch)
tree590fb03144b199a9ae944d150c5e6c3a0f127c6f /gcc
parentd983d652e88d45187f71813b7d4dd30b635bf79a (diff)
downloadgcc-2d6fda9cee388788c1b84fe055cc426e53fe8166.zip
gcc-2d6fda9cee388788c1b84fe055cc426e53fe8166.tar.gz
gcc-2d6fda9cee388788c1b84fe055cc426e53fe8166.tar.bz2
(i960_output_ldconst): Use REAL_VALUE_FROM_CONST_DOUBLE instead of pointer...
(i960_output_ldconst): Use REAL_VALUE_FROM_CONST_DOUBLE instead of pointer indirection to extract double from CONST_DOUBLE. From-SVN: r1655
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i960/i960.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c
index 70abbdd..9f11fc7 100644
--- a/gcc/config/i960/i960.c
+++ b/gcc/config/i960/i960.c
@@ -626,13 +626,15 @@ i960_output_ldconst (dst, src)
else if (mode == SFmode)
{
#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- union { long l; float f; } flt;
+ REAL_VALUE_TYPE d;
+ long value;
- flt.f = (float) *((double *) &CONST_DOUBLE_LOW (src));
+ REAL_VALUE_FROM_CONST_DOUBLE (d, src);
+ REAL_VALUE_TO_TARGET_SINGLE (d, value);
output_asm_insn ("# ldconst %1,%0",operands);
operands[0] = gen_rtx (REG, SImode, REGNO (dst));
- operands[1] = gen_rtx (CONST_INT, VOIDmode, flt.l);
+ operands[1] = gen_rtx (CONST_INT, VOIDmode, value);
output_asm_insn (i960_output_ldconst (operands[0], operands[1]),
operands);
#else