Lines Matching defs:shift
96 lsl16(uint16_t x, uint32_t shift)
98 return shift < 16 ? x << shift : 0;
102 lsr16(uint16_t x, uint32_t shift)
104 return shift < 16 ? x >> shift : 0;
108 lsl32(uint32_t x, uint32_t shift)
110 return shift < 32 ? x << shift : 0;
114 lsr32(uint32_t x, uint32_t shift)
116 return shift < 32 ? x >> shift : 0;
120 lsl64(uint64_t x, uint32_t shift)
122 return shift < 64 ? x << shift : 0;
126 lsr64(uint64_t x, uint32_t shift)
128 return shift < 64 ? x >> shift : 0;
132 lsl128(uint64_t *r0, uint64_t *r1, uint64_t x0, uint64_t x1, uint32_t shift)
134 if (shift == 0) {
137 } else if (shift < 64) {
138 *r1 = x1 << shift | x0 >> (64 - shift);
139 *r0 = x0 << shift;
140 } else if (shift < 128) {
141 *r1 = x0 << (shift - 64);
150 lsr128(uint64_t *r0, uint64_t *r1, uint64_t x0, uint64_t x1, uint32_t shift)
152 if (shift == 0) {
155 } else if (shift < 64) {
156 *r0 = x0 >> shift | x1 << (64 - shift);
157 *r1 = x1 >> shift;
158 } else if (shift < 128) {
159 *r0 = x1 >> (shift - 64);
219 int shift;
225 for (shift = 8; shift; shift >>= 1) {
226 if (!(mnt >> (16 - shift))) {
227 mnt <<= shift;
228 *exp -= shift;
237 int shift;
243 for (shift = 16; shift; shift >>= 1) {
244 if (!(mnt >> (32 - shift))) {
245 mnt <<= shift;
246 *exp -= shift;
255 int shift;
261 for (shift = 32; shift; shift >>= 1) {
262 if (!(mnt >> (64 - shift))) {
263 mnt <<= shift;
264 *exp -= shift;
275 int shift;
287 for (shift = 32; shift; shift >>= 1) {
288 if (!(x1 >> (64 - shift))) {
289 x1 = x1 << shift | x0 >> (64 - shift);
290 x0 <<= shift;
291 *exp -= shift;