Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bit: Update to match C23 | Tavian Barnes | 2024-05-29 | 1 | -51/+45 |
| | | | | | | | | | | Based on the latest C23 draft (N3220): - Argument types to generic bit functions should be unsigned - Bit functions return unsigned int - Byte-swapping functions (stdc_memreverse8*()) weren't added - stdc_rotate_{left,right}() weren't added - first_leading_*() counts from the *left* | ||||
* | Rename config.h to prelude.h | Tavian Barnes | 2024-04-19 | 1 | -1/+1 |
| | |||||
* | bit: Check __BYTE_ORDER__ for the native endian | Tavian Barnes | 2024-03-21 | 1 | -2/+2 |
| | | | | __ORDER_NATIVE_ENDIAN__ is not a thing. | ||||
* | bit: Rename bswap{16,32,64}() | Tavian Barnes | 2024-01-03 | 1 | -16/+16 |
| | | | | | NetBSD already defines this in <sys/bswap.h>, so pick names that don't conflict. | ||||
* | bit: Implement a branchless has_single_bit() | Tavian Barnes | 2023-11-13 | 1 | -1/+2 |
| | |||||
* | Revert "bit: Implement a branchless has_single_bit()" | Tavian Barnes | 2023-11-11 | 1 | -2/+1 |
| | | | | | | Doesn't work for the highest bit due to overflow. This reverts commit 208376ef99da243545efcd6fb02d3469b4c068ed. | ||||
* | bit: Implement a branchless has_single_bit() | Tavian Barnes | 2023-11-10 | 1 | -1/+2 |
| | |||||
* | config: Add constants for C standard versions | Tavian Barnes | 2023-11-10 | 1 | -4/+4 |
| | |||||
* | bit: Fix UINTPTR_WIDTH typo | Tavian Barnes | 2023-09-26 | 1 | -1/+1 |
| | |||||
* | bit: Use predefined __*_WIDTH__ macros if we can | Tavian Barnes | 2023-09-26 | 1 | -24/+69 |
| | |||||
* | bit: Add a cast to squelch -Wsign-compare | Tavian Barnes | 2023-07-24 | 1 | -1/+1 |
| | | | | I see this only with musl-gcc for some reason. | ||||
* | bit: Rename int.h to bit.h | Tavian Barnes | 2023-05-18 | 1 | -0/+355 |