Lines Matching defs:shift_amount
205 // shift_amount. The shift_amount can't be more than MAX_SHIFT_AMOUNT to
207 LIBC_INLINE void right_shift(uint32_t shift_amount) {
213 const uint64_t shift_mask = (uint64_t(1) << shift_amount) - 1;
217 while (accumulator >> shift_amount == 0) {
236 uint64_t write_digit = accumulator >> shift_amount;
247 uint64_t write_digit = accumulator >> shift_amount;
262 // shift_amount. The shift_amount can't be more than MAX_SHIFT_AMOUNT to
264 LIBC_INLINE void left_shift(uint32_t shift_amount) {
265 uint32_t new_digits = this->get_num_new_digits(shift_amount);
279 << shift_amount;
385 // Binary shift left (shift_amount > 0) or right (shift_amount < 0)
386 LIBC_INLINE void shift(int shift_amount) {
387 if (shift_amount == 0) {
391 else if (shift_amount > 0) {
392 while (static_cast<uint32_t>(shift_amount) > MAX_SHIFT_AMOUNT) {
394 shift_amount -= MAX_SHIFT_AMOUNT;
396 this->left_shift(shift_amount);
400 while (static_cast<uint32_t>(shift_amount) < -MAX_SHIFT_AMOUNT) {
402 shift_amount += MAX_SHIFT_AMOUNT;
404 this->right_shift(-shift_amount);