diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2013-11-26 16:05:10 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-11-26 16:05:10 +0000 |
commit | 6f476861be660541eee229acfbc9ef4098af70ab (patch) | |
tree | b13987612829459fa7b5a7a29824ead0aa7b9723 /soft-fp/op-4.h | |
parent | 2fe162299f47ced903e3d634e216d622a5d9af52 (diff) | |
download | glibc-6f476861be660541eee229acfbc9ef4098af70ab.tar glibc-6f476861be660541eee229acfbc9ef4098af70ab.tar.gz glibc-6f476861be660541eee229acfbc9ef4098af70ab.tar.bz2 glibc-6f476861be660541eee229acfbc9ef4098af70ab.zip |
Avoid "left shift count >= width of type" warnings in soft-fp code.
Diffstat (limited to 'soft-fp/op-4.h')
-rw-r--r-- | soft-fp/op-4.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/soft-fp/op-4.h b/soft-fp/op-4.h index 3515bdc497..6c6b461166 100644 --- a/soft-fp/op-4.h +++ b/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]; \ } \ } \ |