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

spRegNum

Public Function
std.debug.Dwarf.spRegNum
pub fn spRegNum(arch: std.Target.Cpu.Arch) u16

Params

File

debug/Dwarf.zig:1568
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
pub fn spRegNum(arch: std.Target.Cpu.Arch) u16 {
    return switch (arch) {
        .aarch64, .aarch64_be => 31,
        .alpha => 30,
        .arc, .arceb => 28,
        .arm, .armeb, .thumb, .thumbeb => 13,
        .csky => 14,
        .hexagon => 29,
        .kvx => 12,
        .lanai => 4,
        .loongarch32, .loongarch64 => 3,
        .m68k => 15,
        .m88k => 31,
        .mips, .mipsel, .mips64, .mips64el => 29,
        .or1k => 1,
        .powerpc, .powerpcle, .powerpc64, .powerpc64le => 1,
        .riscv32, .riscv32be, .riscv64, .riscv64be => 2,
        .s390x => 15,
        .sparc, .sparc64 => 14,
        .ve => 11,
        .x86 => 4,
        .x86_64 => 7,
        else => unreachable,
    };
}