Lines Matching refs:shift
99 unsigned shift, sign = (a >> 63) & 1; in drm_fixp_msbset() local
101 for (shift = 62; shift > 0; --shift) in drm_fixp_msbset()
102 if (((a >> shift) & 1) != sign) in drm_fixp_msbset()
103 return shift; in drm_fixp_msbset()
110 unsigned shift = drm_fixp_msbset(a) + drm_fixp_msbset(b); in drm_fixp_mul() local
113 if (shift > 61) { in drm_fixp_mul()
114 shift = shift - 61; in drm_fixp_mul()
115 a >>= (shift >> 1) + (shift & 1); in drm_fixp_mul()
116 b >>= shift >> 1; in drm_fixp_mul()
118 shift = 0; in drm_fixp_mul()
122 if (shift > DRM_FIXED_POINT) in drm_fixp_mul()
123 return result << (shift - DRM_FIXED_POINT); in drm_fixp_mul()
125 if (shift < DRM_FIXED_POINT) in drm_fixp_mul()
126 return result >> (DRM_FIXED_POINT - shift); in drm_fixp_mul()
133 unsigned shift = 62 - drm_fixp_msbset(a); in drm_fixp_div() local
136 a <<= shift; in drm_fixp_div()
138 if (shift < DRM_FIXED_POINT) in drm_fixp_div()
139 b >>= (DRM_FIXED_POINT - shift); in drm_fixp_div()
143 if (shift > DRM_FIXED_POINT) in drm_fixp_div()
144 return result >> (shift - DRM_FIXED_POINT); in drm_fixp_div()