From 8fdda7afb883589b46e423f91f32988373670bfa Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 21 Jun 2013 19:00:43 +0000 Subject: Fix bad shift in soft-fp (bug 7006). --- soft-fp/op-common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'soft-fp/op-common.h') diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h index ce472e0d5e..c4acb99161 100644 --- a/soft-fp/op-common.h +++ b/soft-fp/op-common.h @@ -1163,8 +1163,9 @@ do { \ { \ /* Exactly representable; shift left. */ \ _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \ - _FP_FRAC_SLL_##wc(X, (_FP_EXPBIAS_##fs \ - + _FP_FRACBITS_##fs - 1 - X##_e)); \ + if (_FP_EXPBIAS_##fs + _FP_FRACBITS_##fs - 1 - X##_e > 0) \ + _FP_FRAC_SLL_##wc(X, (_FP_EXPBIAS_##fs \ + + _FP_FRACBITS_##fs - 1 - X##_e)); \ } \ else \ { \ -- cgit 1.4.1