authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-12 03:51:48+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-08-13 23:54:20-07:00
logb470d2a7de20f8036c8976ec18ed1fb16a15c662
treeeade5bfb856a092c8cb1305fa7746a0daebd6ee5
parentdc77d1b66dc67c6fcfeafdfd079dab79c320d2b1

std.debug: Support sparc32 in StackIterator.init().


1 files changed, 5 insertions(+), 3 deletions(-)

lib/std/debug.zig+5-3
......@@ -567,10 +567,12 @@ pub const StackIterator = struct {
567567 } else void = if (have_ucontext) null else {},
568568
569569 pub fn init(first_address: ?usize, fp: ?usize) StackIterator {
570 if (native_arch == .sparc64) {
570 if (native_arch.isSPARC()) {
571571 // Flush all the register windows on stack.
572 asm volatile (
573 \\ flushw
572 asm volatile (if (std.Target.sparc.featureSetHas(builtin.cpu.features, .v9))
573 "flushw"
574 else
575 "ta 3" // ST_FLUSH_WINDOWS
574576 ::: "memory");
575577 }
576578