Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Function

current

Public Function
std.debug.cpu_context.Arm.current
pub inline fn current() Arm

File

debug/cpu_context.zig:460
460
461
462
463
464
465
466
467
468
469
470
471
472
473
    pub inline fn current() Arm {
        var ctx: Arm = undefined;
        asm volatile (
            \\ // For compatibility with Thumb, we can't write r13 (sp) or r15 (pc) with stm.
            \\ stm r0, {r0-r12}
            \\ str r13, [r0, #0x34]
            \\ str r14, [r0, #0x38]
            \\ mov r1, pc
            \\ str r1, [r0, #0x3c]
            :
            : [r] "{r0}" (&ctx.r),
            : .{ .r1 = true, .memory = true });
        return ctx;
    }