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

File

debug/cpu_context.zig:1864
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
    pub inline fn current() X86_64 {
        var ctx: X86_64 = undefined;
        asm volatile (
            \\ movq %%rax, 0x00(%%rdi)
            \\ movq %%rdx, 0x08(%%rdi)
            \\ movq %%rcx, 0x10(%%rdi)
            \\ movq %%rbx, 0x18(%%rdi)
            \\ movq %%rsi, 0x20(%%rdi)
            \\ movq %%rdi, 0x28(%%rdi)
            \\ movq %%rbp, 0x30(%%rdi)
            \\ movq %%rsp, 0x38(%%rdi)
            \\ movq %%r8,  0x40(%%rdi)
            \\ movq %%r9,  0x48(%%rdi)
            \\ movq %%r10, 0x50(%%rdi)
            \\ movq %%r11, 0x58(%%rdi)
            \\ movq %%r12, 0x60(%%rdi)
            \\ movq %%r13, 0x68(%%rdi)
            \\ movq %%r14, 0x70(%%rdi)
            \\ movq %%r15, 0x78(%%rdi)
            \\ leaq (%%rip), %%rax
            \\ movq %%rax, 0x80(%%rdi)
            :
            : [gprs] "{rdi}" (&ctx.gprs.values),
            : .{ .rax = true, .memory = true });
        return ctx;
    }