Lines Matching refs:num
41 static zend_always_inline int zend_ulong_ntz(zend_ulong num) argument
45 return __builtin_ctzl(num);
47 return __builtin_ctzll(num);
52 if (!BitScanForward64(&index, num)) {
54 if (!BitScanForward(&index, num)) {
64 if (num == Z_UL(0)) return SIZEOF_ZEND_LONG * 8;
68 if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);}
70 if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;}
71 if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;}
72 if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;}
73 if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;}
74 return n - (num & 1);
79 static zend_always_inline int zend_ulong_nlz(zend_ulong num) argument
83 return __builtin_clzl(num);
85 return __builtin_clzll(num);
90 if (!BitScanReverse64(&index, num)) {
92 if (!BitScanReverse(&index, num)) {
105 x = num >> 32; if (x != 0) {n -= 32; num = x;}
109 x = num >> 16; if (x != 0) {n -= 16; num = x;}
110 x = num >> 8; if (x != 0) {n -= 8; num = x;}
111 x = num >> 4; if (x != 0) {n -= 4; num = x;}
112 x = num >> 2; if (x != 0) {n -= 2; num = x;}
113 x = num >> 1; if (x != 0) return n - 2;
114 return n - num;