(i960_output_ldconst): Use REAL_VALUE_FROM_CONST_DOUBLE instead of pointer...
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 21 Jul 1992 19:28:08 +0000 (12:28 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 21 Jul 1992 19:28:08 +0000 (12:28 -0700)
(i960_output_ldconst): Use REAL_VALUE_FROM_CONST_DOUBLE
instead of pointer indirection to extract double from CONST_DOUBLE.

From-SVN: r1655

gcc/config/i960/i960.c

index 70abbdd3024a07488f0ea231a69eb84161333162..9f11fc7ec68e915560391bc822072ca2236b7f1a 100644 (file)
@@ -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