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

File

debug/cpu_context.zig:646
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
    pub inline fn current() Kvx {
        var ctx: Kvx = undefined;
        asm volatile (
            \\ so (0)[$r32] = $r0r1r2r3
            \\ ;;
            \\ so (32)[$r32] = $r4r5r6r7
            \\ ;;
            \\ so (64)[$r32] = $r8r9r10r11
            \\ ;;
            \\ so (96)[$r32] = $r12r13r14r15
            \\ ;;
            \\ so (128)[$r32] = $r16r17r18r19
            \\ ;;
            \\ so (160)[$r32] = $r20r21r22r23
            \\ ;;
            \\ so (192)[$r32] = $r24r25r26r27
            \\ ;;
            \\ so (224)[$r32] = $r28r29r30r31
            \\ ;;
            \\ so (256)[$r32] = $r32r33r34r35
            \\ ;;
            \\ so (288)[$r32] = $r36r37r38r39
            \\ ;;
            \\ so (320)[$r32] = $r40r41r42r43
            \\ ;;
            \\ so (352)[$r32] = $r44r45r46r47
            \\ ;;
            \\ so (384)[$r32] = $r48r49r50r51
            \\ ;;
            \\ so (416)[$r32] = $r52r53r54r55
            \\ ;;
            \\ so (448)[$r32] = $r56r57r58r59
            \\ get $r34 = $pc
            \\ ;;
            \\ so (480)[$r32] = $r60r61r62r63
            \\ get $r35 = $ra
            \\ ;;
            \\ sq (512)[$r32] = $r34r35
            :
            : [ctx] "{r32}" (&ctx),
            : .{ .r34 = true, .r35 = true, .memory = true });
        return ctx;
    }