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.Lanai.current
pub inline fn current() Lanai

File

debug/cpu_context.zig:718
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
    pub inline fn current() Lanai {
        var ctx: Lanai = undefined;
        asm volatile (
            \\ st %%r0, 0[%%r9]
            \\ st %%r1, 4[%%r9]
            \\ st %%r2, 8[%%r9]
            \\ st %%r3, 12[%%r9]
            \\ st %%r4, 16[%%r9]
            \\ st %%r5, 20[%%r9]
            \\ st %%r6, 24[%%r9]
            \\ st %%r7, 28[%%r9]
            \\ st %%r8, 32[%%r9]
            \\ st %%r9, 36[%%r9]
            \\ st %%r10, 40[%%r9]
            \\ st %%r11, 44[%%r9]
            \\ st %%r12, 48[%%r9]
            \\ st %%r13, 52[%%r9]
            \\ st %%r14, 56[%%r9]
            \\ st %%r15, 60[%%r9]
            \\ st %%r16, 64[%%r9]
            \\ st %%r17, 68[%%r9]
            \\ st %%r18, 72[%%r9]
            \\ st %%r19, 76[%%r9]
            \\ st %%r20, 80[%%r9]
            \\ st %%r21, 84[%%r9]
            \\ st %%r22, 88[%%r9]
            \\ st %%r23, 92[%%r9]
            \\ st %%r24, 96[%%r9]
            \\ st %%r25, 100[%%r9]
            \\ st %%r26, 104[%%r9]
            \\ st %%r27, 108[%%r9]
            \\ st %%r28, 112[%%r9]
            \\ st %%r29, 116[%%r9]
            \\ st %%r30, 120[%%r9]
            \\ st %%r31, 124[%%r9]
            :
            : [ctx] "{r9}" (&ctx),
            : .{ .memory = true });
        return ctx;
    }