Zig 0.17.0-dev (Split by item)

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 library itself.

ipRegNum

Returns null for CPU architectures without an instruction pointer register.

Dwarf.ipRegNum
pub fn ipRegNum(arch: std.Target.Cpu.Arch) ?u16

File

lib/std/debug/Dwarf.zig:1436

Code

pub fn ipRegNum(arch: std.Target.Cpu.Arch) ?u16 {
    return switch (arch) {
        .aarch64, .aarch64_be => 32,
        .alpha => 64,
        .arc, .arceb => 160,
        .arm, .armeb, .thumb, .thumbeb => 15,
        .csky => 64,
        .hexagon => 76,
        .kvx => 64,
        .lanai => 2,
        .loongarch32, .loongarch64 => 64,
        .m68k => 26,
        .m88k => 64,
        .mips, .mipsel, .mips64, .mips64el => 66,
        .or1k => 35,
        .powerpc, .powerpcle, .powerpc64, .powerpc64le => 67,
        .riscv32, .riscv32be, .riscv64, .riscv64be => 65,
        .s390x => 65,
        .sparc, .sparc64 => 32,
        .ve => 144,
        .x86 => 8,
        .x86_64 => 16,
        else => null,
    };
}