Skip to content

Commit a15bd50

Browse files
committed
remove cast of argument to __builtin_popcount
1 parent c9286c4 commit a15bd50

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

boot/pb/scheme.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ typedef unsigned char octet;
142142
#define Sunbox(x) (*((ptr *)TO_VOIDP((uptr)(x)+9)))
143143
static inline int Spopcount(uptr x) {
144144
#if defined(__clang__) || defined(__GNUC__)
145-
return __builtin_popcountll((unsigned long)x);
145+
return __builtin_popcountll(x);
146146
#else
147147
/* count bits of each 2-bit chunk */
148148
x = x - ((x >> 1) & 0x5555555555555555ULL);

s/mkheader.ss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@
348348
"0x0F0F0F0F0F0F0F0FULL" "0x0101010101010101ULL" 56)])])
349349
(pr "static inline int Spopcount(uptr x) {\n")
350350
(pr "#if defined(__clang__) || defined(__GNUC__)\n")
351-
(pr " return __builtin_popcount~a((unsigned long)x);\n" suffix)
351+
(pr " return __builtin_popcount~a(x);\n" suffix)
352352
(pr "#else\n")
353353
(pr " /* count bits of each 2-bit chunk */\n")
354354
(pr " x = x - ((x >> 1) & ~a);\n" fives)

0 commit comments

Comments
 (0)