Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 9cdf93a

Browse files
committed
Undefine __builtin_clz/ctz from clzdi2/ctzdi2 if defined
1 parent 2cf5ef4 commit 9cdf93a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

clzdi2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ COMPILER_RT_ABI int __clzdi2(di_int a) {
3333
return clzsi((x.s.high & ~f) | (x.s.low & f)) +
3434
(f & ((si_int)(sizeof(si_int) * CHAR_BIT)));
3535
}
36+
37+
#ifdef __builtin_clz
38+
#undef __builtin_clz
39+
#endif

ctzdi2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ COMPILER_RT_ABI int __ctzdi2(di_int a) {
3333
return ctzsi((x.s.high & f) | (x.s.low & ~f)) +
3434
(f & ((si_int)(sizeof(si_int) * CHAR_BIT)));
3535
}
36+
37+
#ifdef __builtin_ctz
38+
#undef __builtin_ctz
39+
#endif

0 commit comments

Comments
 (0)