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_ldeor8_acq_rel

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

File

lib/compiler_rt/aarch64_outline_atomics.zig:1894

Code

fn __aarch64_ldeor8_acq_rel() align(16) callconv(.naked) void {
    @setRuntimeSafety(false);
    asm volatile (
        \\        cbz     w16, 8f
        \\        .inst 0x38200020 + 0x2000 + 0xc0000000 + 0xc00000
        \\        ret
        \\8:
        \\        mov    x16, x0
        \\0:
        \\        ldaxr   x0, [x1]
        \\        eor     x17, x0, x16
        \\        stlxr   w15, x17, [x1]
        \\        cbnz   w15, 0b
        \\1:
        \\        ret
        :
        : [__aarch64_have_lse_atomics] "{w16}" (__aarch64_have_lse_atomics),
        : .{ .w15 = true, .w16 = true, .w17 = true, .memory = true });
    unreachable;
}