From: Christoph Mallon Date: Mon, 8 Dec 2008 17:18:11 +0000 (+0000) Subject: Copy the sign bit when truncating a float tarval. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=f3498269f46071dc3fc85b67fad57f106b528d74;p=libfirm Copy the sign bit when truncating a float tarval. [r24403] --- diff --git a/ir/tv/fltcalc.c b/ir/tv/fltcalc.c index 0f162da3f..eedee4d16 100644 --- a/ir/tv/fltcalc.c +++ b/ir/tv/fltcalc.c @@ -811,7 +811,10 @@ static void _trunc(const fp_value *a, fp_value *result) { /* and the mask and return the result */ sc_and(_mant(a), temp, _mant(result)); - if (a != result) memcpy(_exp(result), _exp(a), value_size); + if (a != result) { + memcpy(_exp(result), _exp(a), value_size); + result->sign = a->sign; + } } /********