summary refs log tree commit diff
path: root/soft-fp
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-06-21 19:00:43 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-06-21 19:00:43 +0000
commit8fdda7afb883589b46e423f91f32988373670bfa (patch)
tree10b02e9952aa608262faa00e92fe9157f662491c /soft-fp
parentf3bc5e5a3ef622f1ec11962b7ce08a92ded03bea (diff)
downloadglibc-8fdda7afb883589b46e423f91f32988373670bfa.tar.gz
glibc-8fdda7afb883589b46e423f91f32988373670bfa.tar.xz
glibc-8fdda7afb883589b46e423f91f32988373670bfa.zip
Fix bad shift in soft-fp (bug 7006).
Diffstat (limited to 'soft-fp')
-rw-r--r--soft-fp/op-common.h5
1 files changed, 3 insertions, 2 deletions
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								     \
 	  {								     \