| ... | @@ -472,8 +472,9 @@ fn eqlIgnoreCase(ignore_case: bool, a: []const u8, b: []const u8) bool { | ... | @@ -472,8 +472,9 @@ fn eqlIgnoreCase(ignore_case: bool, a: []const u8, b: []const u8) bool { |
| 472 | } | 472 | } |
| 473 | } | 473 | } |
| 474 | | 474 | |
| 475 | pub fn intByteSize(target: *const std.Target, bits: u16) u19 { | 475 | pub fn intByteSize(target: *const std.Target, bits: u16) u16 { |
| 476 | return std.mem.alignForward(u19, @intCast((@as(u17, bits) + 7) / 8), intAlignment(target, bits)); | 476 | const previous_aligned = std.mem.alignBackward(u16, bits, 8); |
| | 477 | return std.mem.alignForward(u16, @divExact(previous_aligned, 8) + @intFromBool(previous_aligned != bits), intAlignment(target, bits)); |
| 477 | } | 478 | } |
| 478 | | 479 | |
| 479 | pub fn intAlignment(target: *const std.Target, bits: u16) u16 { | 480 | pub fn intAlignment(target: *const std.Target, bits: u16) u16 { |