Lines Matching refs:shift
93 * Description: This function make a 32 bit saturated left shift when the
94 * specified shift is +ve. This function will make a 32 bit right shift when
95 * the specified shift is -ve. This function return the result after shifting
98 s32 qm_shl32(s32 op, int shift)
103 if (shift > 31)
104 shift = 31;
105 else if (shift < -31)
106 shift = -31;
107 if (shift >= 0) {
108 for (i = 0; i < shift; i++)
111 result = result >> (-shift);
118 * Description: This function make a 16 bit saturated left shift when the
119 * specified shift is +ve. This function will make a 16 bit right shift when
120 * the specified shift is -ve. This function return the result after shifting
123 s16 qm_shl16(s16 op, int shift)
128 if (shift > 15)
129 shift = 15;
130 else if (shift < -15)
131 shift = -15;
132 if (shift > 0) {
133 for (i = 0; i < shift; i++)
136 result = result >> (-shift);
143 * Description: This function make a 16 bit right shift when shift is +ve.
144 * This function make a 16 bit saturated left shift when shift is -ve. This
145 * function return the result of the shift operation.
147 s16 qm_shr16(s16 op, int shift)
149 return qm_shl16(op, -shift);