diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-03-03 01:48:13 -0500 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2023-03-05 02:59:01 -0500 |
| commit | e96a0fd0a1a05fe8c3b4d87df03d78ae99b7dbcb (patch) | |
| tree | dc0711cb982c31ac4b385ddfd14d84e1882c666b /lib | |
| parent | 93d696e84ef17a32d5c2f1520a295ebcda968e91 (diff) | |
| download | zig-e96a0fd0a1a05fe8c3b4d87df03d78ae99b7dbcb.tar.gz zig-e96a0fd0a1a05fe8c3b4d87df03d78ae99b7dbcb.zip | |
CBE: "compute" max int alignment the lazy way
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/zig.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1921,7 +1921,7 @@ static inline zig_i128 zig_bit_reverse_i128(zig_i128 val, uint8_t bits) { static inline uint16_t zig_int_bytes(uint16_t bits) { uint16_t bytes = (bits + CHAR_BIT - 1) / CHAR_BIT; - uint16_t alignment = 16; + uint16_t alignment = ZIG_TARGET_MAX_INT_ALIGNMENT; while (alignment / 2 >= bytes) alignment /= 2; return (bytes + alignment - 1) / alignment * alignment; } |
