Skip to content

Commit

Permalink
Add deprecated stubs for _bsf / _bsr
Browse files Browse the repository at this point in the history
  • Loading branch information
jart committed Mar 5, 2024
1 parent 8bfd56b commit bb92347
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libc/intrin/bsf.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ libcesque int bsfll(long long) pureconst;
#define bsfll(x) __builtin_ctzll(x)
#endif

/* deprecated */
#define _bsf(x) bsf(x)
#define _bsfl(x) bsfl(x)
#define _bsfll(x) bsfll(x)

COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_NEXGEN32E_BSF_H_ */
#endif /* _COSMO_SOURCE */
5 changes: 5 additions & 0 deletions libc/intrin/bsr.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ libcesque int bsrll(long long) pureconst;
#define bsrll(x) (__builtin_clzll(x) ^ (sizeof(long long) * 8 - 1))
#endif

/* deprecated */
#define _bsr(x) bsr(x)
#define _bsrl(x) bsrl(x)
#define _bsrll(x) bsrll(x)

COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_NEXGEN32E_BSR_H_ */
#endif /* _COSMO_SOURCE */

0 comments on commit bb92347

Please sign in to comment.