Lines Matching defs:shift
941 mi_ushr_imm(struct mi_builder *b, struct mi_value src, uint32_t shift)
943 if (shift == 0)
946 if (shift >= 64)
950 return mi_imm(mi_value_to_u64(src) >> shift);
955 while (shift) {
956 int bit = u_bit_scan(&shift);
980 mi_ishr_imm(struct mi_builder *b, struct mi_value src, uint32_t shift)
982 if (shift == 0)
985 if (shift >= 64)
989 return mi_imm((int64_t)mi_value_to_u64(src) >> shift);
994 while (shift) {
995 int bit = u_bit_scan(&shift);
1035 mi_ishl_imm(struct mi_builder *b, struct mi_value src, uint32_t shift)
1037 if (shift == 0)
1040 if (shift >= 64)
1044 return mi_imm(mi_value_to_u64(src) << shift);
1050 while (shift) {
1051 int bit = u_bit_scan(&shift);
1056 for (unsigned i = 0; i < shift; i++)
1064 mi_ushr32_imm(struct mi_builder *b, struct mi_value src, uint32_t shift)
1066 if (shift == 0)
1069 if (shift >= 64)
1072 /* We right-shift by left-shifting by 32 - shift and taking the top 32 bits
1076 return mi_imm((mi_value_to_u64(src) >> shift) & UINT32_MAX);
1078 if (shift > 32) {
1085 shift -= 32;
1087 assert(shift <= 32);
1088 struct mi_value tmp = mi_ishl_imm(b, src, 32 - shift);