Lines Matching full:shift
106 unsigned shift, sign = (a >> 63) & 1; in drm_fixp_msbset() local
108 for (shift = 62; shift > 0; --shift) in drm_fixp_msbset()
109 if (((a >> shift) & 1) != sign) in drm_fixp_msbset()
110 return shift; in drm_fixp_msbset()
117 unsigned shift = drm_fixp_msbset(a) + drm_fixp_msbset(b); in drm_fixp_mul() local
120 if (shift > 61) { in drm_fixp_mul()
121 shift = shift - 61; in drm_fixp_mul()
122 a >>= (shift >> 1) + (shift & 1); in drm_fixp_mul()
123 b >>= shift >> 1; in drm_fixp_mul()
125 shift = 0; in drm_fixp_mul()
129 if (shift > DRM_FIXED_POINT) in drm_fixp_mul()
130 return result << (shift - DRM_FIXED_POINT); in drm_fixp_mul()
132 if (shift < DRM_FIXED_POINT) in drm_fixp_mul()
133 return result >> (DRM_FIXED_POINT - shift); in drm_fixp_mul()
140 unsigned shift = 62 - drm_fixp_msbset(a); in drm_fixp_div() local
143 a <<= shift; in drm_fixp_div()
145 if (shift < DRM_FIXED_POINT) in drm_fixp_div()
146 b >>= (DRM_FIXED_POINT - shift); in drm_fixp_div()
150 if (shift > DRM_FIXED_POINT) in drm_fixp_div()
151 return result >> (shift - DRM_FIXED_POINT); in drm_fixp_div()