xfree86: compat: fix Ones for compilers where __builtin_popcountl is missing
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
parent
3f5e4b1d97
commit
0746e6841a
|
@ -27,7 +27,6 @@ Ones(unsigned long mask)
|
|||
|
||||
y = (mask >> 1) & 033333333333;
|
||||
y = mask - y - ((y >> 1) & 033333333333);
|
||||
/* x & 077 == x % 077 */
|
||||
return (((y + (y >> 3)) & 030707070707) & 077);
|
||||
return (((y + (y >> 3)) & 030707070707) % 077);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue