diff options
author | Richard Earnshaw <erich@gnu.org> | 1995-12-14 22:21:54 +0000 |
---|---|---|
committer | Richard Earnshaw <erich@gnu.org> | 1995-12-14 22:21:54 +0000 |
commit | 226a50517f06ecf64f8092bfa34feb5feca2ac2a (patch) | |
tree | a93d708015f703fb97320662647551504dc7d9b3 /gcc | |
parent | f92213c8c60cd95793c25d6753a1fc55a04fadfa (diff) | |
download | gcc-226a50517f06ecf64f8092bfa34feb5feca2ac2a.zip gcc-226a50517f06ecf64f8092bfa34feb5feca2ac2a.tar.gz gcc-226a50517f06ecf64f8092bfa34feb5feca2ac2a.tar.bz2 |
arm/arm.c (output_move_double): Extract DFmode constants using
REAL_VALUE_TO_TARGET_DOUBLE.
From-SVN: r10720
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/arm/arm.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 079e4b6..fc8ca78 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2900,10 +2900,22 @@ output_move_double (operands) } else if (code1 == CONST_DOUBLE) { - otherops[1] = gen_rtx (CONST_INT, VOIDmode, - CONST_DOUBLE_HIGH (operands[1])); - operands[1] = gen_rtx (CONST_INT, VOIDmode, - CONST_DOUBLE_LOW (operands[1])); + if (GET_MODE (operands[1]) == DFmode) + { + long l[2]; + union real_extract u; + + bcopy ((char *) &CONST_DOUBLE_LOW (operands[1]), (char *) &u, + sizeof (u)); + REAL_VALUE_TO_TARGET_DOUBLE (u.d, l); + otherops[1] = GEN_INT(l[1]); + operands[1] = GEN_INT(l[0]); + } + else + { + otherops[1] = GEN_INT (CONST_DOUBLE_HIGH (operands[1])); + operands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); + } output_mov_immediate (operands, FALSE, ""); output_mov_immediate (otherops, FALSE, ""); } |