Lines Matching refs:shift
123 unsigned shift, sign = (a >> 63) & 1; in drm_fixp_msbset() local
125 for (shift = 62; shift > 0; --shift) in drm_fixp_msbset()
126 if (((a >> shift) & 1) != sign) in drm_fixp_msbset()
127 return shift; in drm_fixp_msbset()
134 unsigned shift = drm_fixp_msbset(a) + drm_fixp_msbset(b); in drm_fixp_mul() local
137 if (shift > 61) { in drm_fixp_mul()
138 shift = shift - 61; in drm_fixp_mul()
139 a >>= (shift >> 1) + (shift & 1); in drm_fixp_mul()
140 b >>= shift >> 1; in drm_fixp_mul()
142 shift = 0; in drm_fixp_mul()
146 if (shift > DRM_FIXED_POINT) in drm_fixp_mul()
147 return result << (shift - DRM_FIXED_POINT); in drm_fixp_mul()
149 if (shift < DRM_FIXED_POINT) in drm_fixp_mul()
150 return result >> (DRM_FIXED_POINT - shift); in drm_fixp_mul()
157 unsigned shift = 62 - drm_fixp_msbset(a); in drm_fixp_div() local
160 a <<= shift; in drm_fixp_div()
162 if (shift < DRM_FIXED_POINT) in drm_fixp_div()
163 b >>= (DRM_FIXED_POINT - shift); in drm_fixp_div()
167 if (shift > DRM_FIXED_POINT) in drm_fixp_div()
168 return result >> (shift - DRM_FIXED_POINT); in drm_fixp_div()