From: Jim Wilson Date: Tue, 21 Jul 1992 19:28:08 +0000 (-0700) Subject: (i960_output_ldconst): Use REAL_VALUE_FROM_CONST_DOUBLE instead of pointer... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d6fda9cee388788c1b84fe055cc426e53fe8166;p=gcc.git (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 --- diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c index 70abbdd3024..9f11fc7ec68 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