From a634bb53350dd906e6d47eaccd1d81f021dcda20 Mon Sep 17 00:00:00 2001 From: by Date: Wed, 15 Jul 2026 07:23:45 +0800 Subject: [PATCH] fix(cortex-m): add missing return in set_pending/clear_pending for m0+ SVCALL --- core/src/cpus/cortex_m.zig | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/cpus/cortex_m.zig b/core/src/cpus/cortex_m.zig index 2d1acf289..3abd4e794 100644 --- a/core/src/cpus/cortex_m.zig +++ b/core/src/cpus/cortex_m.zig @@ -262,7 +262,10 @@ pub const interrupt = struct { switch (cortex_m) { .cortex_m0plus, => { - if (excpt == .SVCALL) ppb.SHCSR.raw |= 0x0000_8000; + if (excpt == .SVCALL) { + ppb.SHCSR.raw |= 0x0000_8000; + return; + } @compileError("not supported on this platform"); }, .cortex_m3, .cortex_m4, .cortex_m7 => { @@ -295,7 +298,10 @@ pub const interrupt = struct { switch (cortex_m) { .cortex_m0plus, => { - if (excpt == .SVCALL) ppb.SHCSR.raw &= ~@as(u32, 0x0000_8000); + if (excpt == .SVCALL) { + ppb.SHCSR.raw &= ~@as(u32, 0x0000_8000); + return; + } @compileError("not supported on this platform"); }, .cortex_m3, .cortex_m4, .cortex_m7 => {