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

File

debug/cpu_context.zig:249
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
    pub inline fn current() Aarch64 {
        var ctx: Aarch64 = undefined;
        asm volatile (
            \\ stp x0,  x1,  [x0, #0x000]
            \\ stp x2,  x3,  [x0, #0x010]
            \\ stp x4,  x5,  [x0, #0x020]
            \\ stp x6,  x7,  [x0, #0x030]
            \\ stp x8,  x9,  [x0, #0x040]
            \\ stp x10, x11, [x0, #0x050]
            \\ stp x12, x13, [x0, #0x060]
            \\ stp x14, x15, [x0, #0x070]
            \\ stp x16, x17, [x0, #0x080]
            \\ stp x18, x19, [x0, #0x090]
            \\ stp x20, x21, [x0, #0x0a0]
            \\ stp x22, x23, [x0, #0x0b0]
            \\ stp x24, x25, [x0, #0x0c0]
            \\ stp x26, x27, [x0, #0x0d0]
            \\ stp x28, x29, [x0, #0x0e0]
            \\ str x30, [x0, #0x0f0]
            \\ mov x1, sp
            \\ str x1, [x0, #0x0f8]
            \\ adr x1, .
            \\ str x1, [x0, #0x100]
            :
            : [ctx] "{x0}" (&ctx),
            : .{ .x1 = true, .memory = true });
        return ctx;
    }