Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

__not_limb64

limb64.__not_limb64
fn __not_limb64(out_ptr: [*]u64, a_ptr: [*]const u64, is_signed: bool, bits: u16) callconv(.c) void

File

lib/compiler_rt/limb64.zig:459

Code

fn __not_limb64(out_ptr: [*]u64, a_ptr: [*]const u64, is_signed: bool, bits: u16) callconv(.c) void {
    const limb_cnt = usedLimbCount(bits);
    const out = varLimbs(out_ptr, bits);
    const a = constLimbs(a_ptr, bits);

    var i: usize = 0;
    while (i < limb_cnt - 1) : (i += 1) {
        limbSet(out, i, ~limbGet(a, i));
    }

    var limb: u64 = ~limbGet(a, i);
    if (!is_signed and bits % 64 != 0) {
        limb = limbWrap(limb, is_signed, bits);
    }
    limbSet(out, i, limb);
    fixLastLimb(out_ptr, is_signed, bits);
}