Lines Matching refs:num
48 ZEND_ATTRIBUTE_CONST static zend_always_inline int zend_ulong_ntz(zend_ulong num) argument
52 return __builtin_ctzl(num);
54 return __builtin_ctzll(num);
59 if (!BitScanForward64(&index, num)) {
61 if (!BitScanForward(&index, num)) {
71 if (num == Z_UL(0)) return SIZEOF_ZEND_LONG * 8;
75 if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);}
77 if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;}
78 if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;}
79 if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;}
80 if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;}
81 return n - (num & 1);
86 ZEND_ATTRIBUTE_CONST static zend_always_inline int zend_ulong_nlz(zend_ulong num) argument
90 return __builtin_clzl(num);
92 return __builtin_clzll(num);
97 if (!BitScanReverse64(&index, num)) {
99 if (!BitScanReverse(&index, num)) {
112 x = num >> 32; if (x != 0) {n -= 32; num = x;}
116 x = num >> 16; if (x != 0) {n -= 16; num = x;}
117 x = num >> 8; if (x != 0) {n -= 8; num = x;}
118 x = num >> 4; if (x != 0) {n -= 4; num = x;}
119 x = num >> 2; if (x != 0) {n -= 2; num = x;}
120 x = num >> 1; if (x != 0) return n - 2;
121 return n - num;