authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-05-26 14:58:48+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-05-26 15:40:42+02:00
log6ed30064d3fb509769debe57382bb689323dc65b
treeab27d0d129c0ec8dd15c407aaa3deecf2781ba5f
parent7c2efe50005a5e5b17e3bffbe50dbd320de3f87a
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.debug.cpu_context: add mcontext_t for riscv32-netbsd and riscv64-netbsd


1 files changed, 10 insertions(+), 0 deletions(-)

lib/std/debug/cpu_context.zig+10
...@@ -2602,6 +2602,16 @@ const signal_ucontext_t = switch (native_os) {...@@ -2602,6 +2602,16 @@ const signal_ucontext_t = switch (native_os) {
2602 lr: u32,2602 lr: u32,
2603 pc: u32,2603 pc: u32,
2604 },2604 },
2605 // https://github.com/NetBSD/src/blob/861008c62187bf7bc0aac4d81e52ed6eee4d0c74/sys/arch/riscv/include/mcontext.h
2606 .riscv32, .riscv64 => extern struct {
2607 ra_sp_gp_tp: [4]usize align(8),
2608 t0_2: [3]usize,
2609 s0_1: [2]usize,
2610 a: [8]usize,
2611 s2_11: [10]usize,
2612 t3_6: [4]usize,
2613 pc: usize,
2614 },
2605 // https://github.com/NetBSD/src/blob/861008c62187bf7bc0aac4d81e52ed6eee4d0c74/sys/arch/sparc/include/mcontext.h2615 // https://github.com/NetBSD/src/blob/861008c62187bf7bc0aac4d81e52ed6eee4d0c74/sys/arch/sparc/include/mcontext.h
2606 .sparc => @compileError("sparc-netbsd mcontext_t missing"),2616 .sparc => @compileError("sparc-netbsd mcontext_t missing"),
2607 .sparc64 => @compileError("sparc64-netbsd mcontext_t missing"),2617 .sparc64 => @compileError("sparc64-netbsd mcontext_t missing"),