| ... | @@ -567,10 +567,12 @@ pub const StackIterator = struct { | ... | @@ -567,10 +567,12 @@ pub const StackIterator = struct { |
| 567 | } else void = if (have_ucontext) null else {}, | 567 | } else void = if (have_ucontext) null else {}, |
| 568 | | 568 | |
| 569 | pub fn init(first_address: ?usize, fp: ?usize) StackIterator { | 569 | pub fn init(first_address: ?usize, fp: ?usize) StackIterator { |
| 570 | if (native_arch == .sparc64) { | 570 | if (native_arch.isSPARC()) { |
| 571 | // Flush all the register windows on stack. | 571 | // Flush all the register windows on stack. |
| 572 | asm volatile ( | 572 | asm volatile (if (std.Target.sparc.featureSetHas(builtin.cpu.features, .v9)) |
| 573 | \\ flushw | 573 | "flushw" |
| | 574 | else |
| | 575 | "ta 3" // ST_FLUSH_WINDOWS |
| 574 | ::: "memory"); | 576 | ::: "memory"); |
| 575 | } | 577 | } |
| 576 | | 578 | |