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.

__aarch64_ldadd1_acq_rel

aarch64_outline_atomics.__aarch64_ldadd1_acq_rel
fn __aarch64_ldadd1_acq_rel() align(16) callconv(.naked) void

File

lib/compiler_rt/aarch64_outline_atomics.zig:414

Code

fn __aarch64_ldadd1_acq_rel() align(16) callconv(.naked) void {
    @setRuntimeSafety(false);
    asm volatile (
        \\        cbz     w16, 8f
        \\        .inst 0x38200020 + 0x0000 + 0x00000000 + 0xc00000
        \\        ret
        \\8:
        \\        mov    w16, w0
        \\0:
        \\        ldaxrb   w0, [x1]
        \\        add     w17, w0, w16
        \\        stlxrb   w15, w17, [x1]
        \\        cbnz   w15, 0b
        \\1:
        \\        ret
        :
        : [__aarch64_have_lse_atomics] "{w16}" (__aarch64_have_lse_atomics),
        : .{ .w15 = true, .w16 = true, .w17 = true, .memory = true });
    unreachable;
}