about summary refs log tree commit diff
path: root/soft-fp/op-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'soft-fp/op-common.h')
-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								     \
 	  {								     \