diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-10-15 00:17:35 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-10-15 00:17:35 +0000 |
commit | 1e14558915352b8324428be4e735df484861b3c6 (patch) | |
tree | 57c8da480295c0f32649297d9045f362bd2e30bb /soft-fp/op-8.h | |
parent | 17c48a60b8f51e627fc1a1bc3805a80b7bdf6d8d (diff) | |
download | glibc-1e14558915352b8324428be4e735df484861b3c6.zip glibc-1e14558915352b8324428be4e735df484861b3c6.tar.gz glibc-1e14558915352b8324428be4e735df484861b3c6.tar.bz2 |
soft-fp: fix vertical whitespace and indentation.
Diffstat (limited to 'soft-fp/op-8.h')
-rw-r--r-- | soft-fp/op-8.h | 131 |
1 files changed, 69 insertions, 62 deletions
diff --git a/soft-fp/op-8.h b/soft-fp/op-8.h index 8890d02..1cfe819 100644 --- a/soft-fp/op-8.h +++ b/soft-fp/op-8.h @@ -36,45 +36,49 @@ #define _FP_FRAC_LOW_8(X) (X##_f[0]) #define _FP_FRAC_WORD_8(X,w) (X##_f[w]) -#define _FP_FRAC_SLL_8(X,N) \ - do { \ - _FP_I_TYPE _up, _down, _skip, _i; \ - _skip = (N) / _FP_W_TYPE_SIZE; \ - _up = (N) % _FP_W_TYPE_SIZE; \ - _down = _FP_W_TYPE_SIZE - _up; \ - if (!_up) \ - for (_i = 7; _i >= _skip; --_i) \ - X##_f[_i] = X##_f[_i-_skip]; \ - else \ - { \ - for (_i = 7; _i > _skip; --_i) \ - X##_f[_i] = X##_f[_i-_skip] << _up \ - | X##_f[_i-_skip-1] >> _down; \ - X##_f[_i--] = X##_f[0] << _up; \ - } \ - for (; _i >= 0; --_i) \ - X##_f[_i] = 0; \ - } while (0) +#define _FP_FRAC_SLL_8(X,N) \ + do \ + { \ + _FP_I_TYPE _up, _down, _skip, _i; \ + _skip = (N) / _FP_W_TYPE_SIZE; \ + _up = (N) % _FP_W_TYPE_SIZE; \ + _down = _FP_W_TYPE_SIZE - _up; \ + if (!_up) \ + for (_i = 7; _i >= _skip; --_i) \ + X##_f[_i] = X##_f[_i-_skip]; \ + else \ + { \ + for (_i = 7; _i > _skip; --_i) \ + X##_f[_i] = (X##_f[_i-_skip] << _up \ + | X##_f[_i-_skip-1] >> _down); \ + X##_f[_i--] = X##_f[0] << _up; \ + } \ + for (; _i >= 0; --_i) \ + X##_f[_i] = 0; \ + } \ + while (0) -#define _FP_FRAC_SRL_8(X,N) \ - do { \ - _FP_I_TYPE _up, _down, _skip, _i; \ - _skip = (N) / _FP_W_TYPE_SIZE; \ - _down = (N) % _FP_W_TYPE_SIZE; \ - _up = _FP_W_TYPE_SIZE - _down; \ - if (!_down) \ - for (_i = 0; _i <= 7-_skip; ++_i) \ - X##_f[_i] = X##_f[_i+_skip]; \ - else \ - { \ - for (_i = 0; _i < 7-_skip; ++_i) \ - X##_f[_i] = X##_f[_i+_skip] >> _down \ - | X##_f[_i+_skip+1] << _up; \ - X##_f[_i++] = X##_f[7] >> _down; \ - } \ - for (; _i < 8; ++_i) \ - X##_f[_i] = 0; \ - } while (0) +#define _FP_FRAC_SRL_8(X,N) \ + do \ + { \ + _FP_I_TYPE _up, _down, _skip, _i; \ + _skip = (N) / _FP_W_TYPE_SIZE; \ + _down = (N) % _FP_W_TYPE_SIZE; \ + _up = _FP_W_TYPE_SIZE - _down; \ + if (!_down) \ + for (_i = 0; _i <= 7-_skip; ++_i) \ + X##_f[_i] = X##_f[_i+_skip]; \ + else \ + { \ + for (_i = 0; _i < 7-_skip; ++_i) \ + X##_f[_i] = (X##_f[_i+_skip] >> _down \ + | X##_f[_i+_skip+1] << _up); \ + X##_f[_i++] = X##_f[7] >> _down; \ + } \ + for (; _i < 8; ++_i) \ + X##_f[_i] = 0; \ + } \ + while (0) /* Right shift with sticky-lsb. @@ -83,27 +87,30 @@ * were one then we always set the LSbit. */ #define _FP_FRAC_SRS_8(X,N,size) \ - do { \ - _FP_I_TYPE _up, _down, _skip, _i; \ - _FP_W_TYPE _s; \ - _skip = (N) / _FP_W_TYPE_SIZE; \ - _down = (N) % _FP_W_TYPE_SIZE; \ - _up = _FP_W_TYPE_SIZE - _down; \ - for (_s = _i = 0; _i < _skip; ++_i) \ - _s |= X##_f[_i]; \ - if (!_down) \ - for (_i = 0; _i <= 7-_skip; ++_i) \ - X##_f[_i] = X##_f[_i+_skip]; \ - else \ - { \ - _s |= X##_f[_i] << _up; \ - for (_i = 0; _i < 7-_skip; ++_i) \ - X##_f[_i] = X##_f[_i+_skip] >> _down \ - | X##_f[_i+_skip+1] << _up; \ - X##_f[_i++] = X##_f[7] >> _down; \ - } \ - for (; _i < 8; ++_i) \ - X##_f[_i] = 0; \ - /* don't fix the LSB until the very end when we're sure f[0] is stable */ \ - X##_f[0] |= (_s != 0); \ - } while (0) + do \ + { \ + _FP_I_TYPE _up, _down, _skip, _i; \ + _FP_W_TYPE _s; \ + _skip = (N) / _FP_W_TYPE_SIZE; \ + _down = (N) % _FP_W_TYPE_SIZE; \ + _up = _FP_W_TYPE_SIZE - _down; \ + for (_s = _i = 0; _i < _skip; ++_i) \ + _s |= X##_f[_i]; \ + if (!_down) \ + for (_i = 0; _i <= 7-_skip; ++_i) \ + X##_f[_i] = X##_f[_i+_skip]; \ + else \ + { \ + _s |= X##_f[_i] << _up; \ + for (_i = 0; _i < 7-_skip; ++_i) \ + X##_f[_i] = (X##_f[_i+_skip] >> _down \ + | X##_f[_i+_skip+1] << _up); \ + X##_f[_i++] = X##_f[7] >> _down; \ + } \ + for (; _i < 8; ++_i) \ + X##_f[_i] = 0; \ + /* don't fix the LSB until the very end when we're sure f[0] is \ + stable */ \ + X##_f[0] |= (_s != 0); \ + } \ + while (0) |