Register state for the native architecture, used by std.debug for stack unwinding.
noreturn if there is no implementation for the native architecture.
This can be overriden by exposing a declaration root.debug.CpuContext.
pub const Native = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "CpuContext"))
root.debug.CpuContext
else switch (native_arch)
pub const Native = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "CpuContext"))
root.debug.CpuContext
else switch (native_arch) {
.aarch64, .aarch64_be => Aarch64,
.alpha => Alpha,
.arc, .arceb => Arc,
.arm, .armeb, .thumb, .thumbeb => Arm,
.csky => Csky,
.hexagon => Hexagon,
.kvx => Kvx,
.lanai => Lanai,
.loongarch32, .loongarch64 => LoongArch,
.m68k => M68k,
.m88k => M88k,
.mips, .mipsel, .mips64, .mips64el => Mips,
.or1k => Or1k,
.powerpc, .powerpcle, .powerpc64, .powerpc64le => Powerpc,
.sparc, .sparc64 => Sparc,
.riscv32, .riscv32be, .riscv64, .riscv64be => Riscv,
.ve => Ve,
.s390x => S390x,
.x86_16 => X86_16,
.x86 => X86,
.x86_64 => X86_64,
else => noreturn,
}