Some recent versions of gcc apparently can detect that x >> 32 will not
work on a 32-bit architecture, but are failing to see that the code will
not be built since it's enclosed in "if (sizeof(LONG) > 4)" or equivalent.
Just shift right twice by 16 bits in this case, the compiler correctly
replaces it by a single 32-bit shift.
No backport is needed.
t = 0;
s = LONGBITS;
if (s > 32) {
- t = (d >> 32) + (d >> 48);
+ unsigned long d2 = (d >> 16) >> 16;
+ t = d2 + (d2 >> 16);
s -= ((t - r) & 256) >> 3; r -= (t & ((t - r) >> 8));
}
t = 0;
s = LONGBITS;
if (s > 32) {
- t = (d >> 32) + (d >> 48);
+ unsigned long d2 = (d >> 16) >> 16;
+ t = d2 + (d2 >> 16);
s -= ((t - r) & 256) >> 3; r -= (t & ((t - r) >> 8));
}