summaryrefslogtreecommitdiff
path: root/libgcc/soft-fp/op-4.h
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-04 12:54:49 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-04 12:54:49 +0000
commitbdff91a14bf8e5d18b1eb47bb529894482065762 (patch)
tree4515b21fe5d3e25b4d5c8f907d3e78834e1e40ac /libgcc/soft-fp/op-4.h
parent0158370253d4aef042c4d67b2c0278ded58d83fd (diff)
parent8192796762b4781de57ce2a6c104a71dcbd874e3 (diff)
downloadgcc-bdff91a14bf8e5d18b1eb47bb529894482065762.tar.gz
Merge with trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@205668 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/soft-fp/op-4.h')
-rw-r--r--libgcc/soft-fp/op-4.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libgcc/soft-fp/op-4.h b/libgcc/soft-fp/op-4.h
index 3515bdc497b..6c6b4611662 100644
--- a/libgcc/soft-fp/op-4.h
+++ b/libgcc/soft-fp/op-4.h
@@ -709,7 +709,7 @@
else if (rsize <= 2*_FP_W_TYPE_SIZE) \
{ \
r = X##_f[1]; \
- r <<= _FP_W_TYPE_SIZE; \
+ r = (rsize <= _FP_W_TYPE_SIZE ? 0 : r << _FP_W_TYPE_SIZE); \
r += X##_f[0]; \
} \
else \
@@ -717,11 +717,11 @@
/* I'm feeling lazy so we deal with int == 3words (implausible)*/ \
/* and int == 4words as a single case. */ \
r = X##_f[3]; \
- r <<= _FP_W_TYPE_SIZE; \
+ r = (rsize <= _FP_W_TYPE_SIZE ? 0 : r << _FP_W_TYPE_SIZE); \
r += X##_f[2]; \
- r <<= _FP_W_TYPE_SIZE; \
+ r = (rsize <= _FP_W_TYPE_SIZE ? 0 : r << _FP_W_TYPE_SIZE); \
r += X##_f[1]; \
- r <<= _FP_W_TYPE_SIZE; \
+ r = (rsize <= _FP_W_TYPE_SIZE ? 0 : r << _FP_W_TYPE_SIZE); \
r += X##_f[0]; \
} \
} \