From 0a7db9eed8f150019df72b3976ed8c4a83bbad54 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Mon, 8 Dec 2008 21:56:14 +0000 Subject: [PATCH] Repairing one case in the tarval module broke another, of course. Repair a bit more and hopefully break a bit less. [r24413] --- ir/tv/fltcalc.c | 2 +- ir/tv/strcalc.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ir/tv/fltcalc.c b/ir/tv/fltcalc.c index 973faf745..b35a23649 100644 --- a/ir/tv/fltcalc.c +++ b/ir/tv/fltcalc.c @@ -1701,7 +1701,7 @@ int fc_flt2int(const fp_value *a, void *result, ir_mode *dst_mode) { mantissa_size = a->desc.mantissa_size + ROUNDING_BITS; shift = exp_val - mantissa_size; - mantissa_size += a->desc.explicit_one; + mantissa_size += 1; if (shift > 0) { sc_shlI(_mant(a), shift, mantissa_size, 0, result); } else { diff --git a/ir/tv/strcalc.c b/ir/tv/strcalc.c index 1bc6eee94..2726bbe32 100644 --- a/ir/tv/strcalc.c +++ b/ir/tv/strcalc.c @@ -847,9 +847,7 @@ static void do_shr(const char *val1, char *buffer, long shift_cnt, int bitsize, carry_flag = 1; /* shift digits to the right with offset, carry and all */ - if ((bitsize >> 2) > shift_nib) { - buffer[0] = shrs_table[_val(val1[shift_nib])][shift_mod][0]; - } + buffer[0] = shrs_table[_val(val1[shift_nib])][shift_mod][0]; for (counter = 1; counter < ((bitsize + 3) >> 2) - shift_nib; counter++) { shrs = shrs_table[_val(val1[counter + shift_nib])][shift_mod]; buffer[counter] = shrs[0]; -- 2.20.1