Commit 8ffeac67 by Roger Sayle Committed by Roger Sayle

real.c (real_floor): Don't leave the result uninitialized when mode is VOIDMode...


	* real.c (real_floor): Don't leave the result uninitialized when
	mode is VOIDMode, but return the unrounded intermediate value.
	(real_ceil): Likewise.

From-SVN: r93988
parent 07ff6dac
2005-01-20 Roger Sayle <roger@eyesopen.com>
* real.c (real_floor): Don't leave the result uninitialized when
mode is VOIDMode, but return the unrounded intermediate value.
(real_ceil): Likewise.
2005-01-20 Paul Brook <paul@codesourcery.com> 2005-01-20 Paul Brook <paul@codesourcery.com>
* config/arm/arm.md (insv): Use gen_int_mode. * config/arm/arm.md (insv): Use gen_int_mode.
......
/* real.c - software floating point emulation. /* real.c - software floating point emulation.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2002, 2003, 2004 Free Software Foundation, Inc. 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Stephen L. Moshier (moshier@world.std.com). Contributed by Stephen L. Moshier (moshier@world.std.com).
Re-written by Richard Henderson <rth@redhat.com> Re-written by Richard Henderson <rth@redhat.com>
...@@ -4625,6 +4625,8 @@ real_floor (REAL_VALUE_TYPE *r, enum machine_mode mode, ...@@ -4625,6 +4625,8 @@ real_floor (REAL_VALUE_TYPE *r, enum machine_mode mode,
do_add (&t, &t, &dconstm1, 0); do_add (&t, &t, &dconstm1, 0);
if (mode != VOIDmode) if (mode != VOIDmode)
real_convert (r, mode, &t); real_convert (r, mode, &t);
else
*r = t;
} }
/* Round X to the smallest integer not less then argument, i.e. round /* Round X to the smallest integer not less then argument, i.e. round
...@@ -4641,6 +4643,8 @@ real_ceil (REAL_VALUE_TYPE *r, enum machine_mode mode, ...@@ -4641,6 +4643,8 @@ real_ceil (REAL_VALUE_TYPE *r, enum machine_mode mode,
do_add (&t, &t, &dconst1, 0); do_add (&t, &t, &dconst1, 0);
if (mode != VOIDmode) if (mode != VOIDmode)
real_convert (r, mode, &t); real_convert (r, mode, &t);
else
*r = t;
} }
/* Round X to the nearest integer, but round halfway cases away from /* Round X to the nearest integer, but round halfway cases away from
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment