summaryrefslogtreecommitdiff
path: root/strtordd.c
diff options
context:
space:
mode:
authorDavid Schultz <das@FreeBSD.org>2011-03-09 06:14:33 +0000
committerDavid Schultz <das@FreeBSD.org>2011-03-09 06:14:33 +0000
commit21a2b1c905e6a3ae73e3ca075627e81a2ccac58f (patch)
tree80228e2b243573cbd695c52e7a912cc1643cd1b2 /strtordd.c
parent9ea4d2a87415d5928272c15f22583103f2ccfe30 (diff)
Notes
Diffstat (limited to 'strtordd.c')
-rw-r--r--strtordd.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/strtordd.c b/strtordd.c
index 9c2b46e65e3e..e0b8e6a23fda 100644
--- a/strtordd.c
+++ b/strtordd.c
@@ -48,8 +48,8 @@ ULtodd(ULong *L, ULong *bits, Long exp, int k)
case STRTOG_Normal:
L[_1] = (bits[1] >> 21 | bits[2] << 11) & (ULong)0xffffffffL;
- L[_0] = bits[2] >> 21 | bits[3] << 11 & 0xfffff
- | exp + 0x3ff + 105 << 20;
+ L[_0] = (bits[2] >> 21) | (bits[3] << 11 & 0xfffff)
+ | ((exp + 0x3ff + 105) << 20);
exp += 0x3ff + 52;
if (bits[1] &= 0x1fffff) {
i = hi0bits(bits[1]) - 11;
@@ -60,7 +60,7 @@ ULtodd(ULong *L, ULong *bits, Long exp, int k)
else
exp -= i;
if (i > 0) {
- bits[1] = bits[1] << i | bits[0] >> 32-i;
+ bits[1] = bits[1] << i | bits[0] >> (32-i);
bits[0] = bits[0] << i & (ULong)0xffffffffL;
}
}
@@ -73,11 +73,11 @@ ULtodd(ULong *L, ULong *bits, Long exp, int k)
else
exp -= i;
if (i < 32) {
- bits[1] = bits[0] >> 32 - i;
+ bits[1] = bits[0] >> (32 - i);
bits[0] = bits[0] << i & (ULong)0xffffffffL;
}
else {
- bits[1] = bits[0] << i - 32;
+ bits[1] = bits[0] << (i - 32);
bits[0] = 0;
}
}
@@ -86,7 +86,7 @@ ULtodd(ULong *L, ULong *bits, Long exp, int k)
break;
}
L[2+_1] = bits[0];
- L[2+_0] = bits[1] & 0xfffff | exp << 20;
+ L[2+_0] = (bits[1] & 0xfffff) | (exp << 20);
break;
case STRTOG_Denormal:
@@ -105,10 +105,10 @@ ULtodd(ULong *L, ULong *bits, Long exp, int k)
nearly_normal:
i = hi0bits(bits[3]) - 11; /* i >= 12 */
j = 32 - i;
- L[_0] = (bits[3] << i | bits[2] >> j) & 0xfffff
- | 65 - i << 20;
+ L[_0] = ((bits[3] << i | bits[2] >> j) & 0xfffff)
+ | ((65 - i) << 20);
L[_1] = (bits[2] << i | bits[1] >> j) & 0xffffffffL;
- L[2+_0] = bits[1] & ((ULong)1L << j) - 1;
+ L[2+_0] = bits[1] & (((ULong)1L << j) - 1);
L[2+_1] = bits[0];
break;
@@ -117,34 +117,34 @@ ULtodd(ULong *L, ULong *bits, Long exp, int k)
if (i < 0) {
j = -i;
i += 32;
- L[_0] = bits[2] >> j & 0xfffff | (33 + j) << 20;
+ L[_0] = (bits[2] >> j & 0xfffff) | ((33 + j) << 20);
L[_1] = (bits[2] << i | bits[1] >> j) & 0xffffffffL;
- L[2+_0] = bits[1] & ((ULong)1L << j) - 1;
+ L[2+_0] = bits[1] & (((ULong)1L << j) - 1);
L[2+_1] = bits[0];
break;
}
if (i == 0) {
- L[_0] = bits[2] & 0xfffff | 33 << 20;
+ L[_0] = (bits[2] & 0xfffff) | (33 << 20);
L[_1] = bits[1];
L[2+_0] = 0;
L[2+_1] = bits[0];
break;
}
j = 32 - i;
- L[_0] = (bits[2] << i | bits[1] >> j) & 0xfffff
- | j + 1 << 20;
+ L[_0] = (((bits[2] << i) | (bits[1] >> j)) & 0xfffff)
+ | ((j + 1) << 20);
L[_1] = (bits[1] << i | bits[0] >> j) & 0xffffffffL;
L[2+_0] = 0;
- L[2+_1] = bits[0] & (1L << j) - 1;
+ L[2+_1] = bits[0] & ((1L << j) - 1);
break;
hardly_normal:
j = 11 - hi0bits(bits[1]);
i = 32 - j;
- L[_0] = bits[1] >> j & 0xfffff | j + 1 << 20;
+ L[_0] = (bits[1] >> j & 0xfffff) | ((j + 1) << 20);
L[_1] = (bits[1] << i | bits[0] >> j) & 0xffffffffL;
L[2+_0] = 0;
- L[2+_1] = bits[0] & ((ULong)1L << j) - 1;
+ L[2+_1] = bits[0] & (((ULong)1L << j) - 1);
break;
case STRTOG_Infinite: