mirror of
https://github.com/ziglang/zig.git
synced 2025-02-08 13:40:30 +00:00
std.debug: Support sparc32 in StackIterator.init().
This commit is contained in:
parent
dc77d1b66d
commit
b470d2a7de
@ -567,10 +567,12 @@ pub const StackIterator = struct {
|
||||
} else void = if (have_ucontext) null else {},
|
||||
|
||||
pub fn init(first_address: ?usize, fp: ?usize) StackIterator {
|
||||
if (native_arch == .sparc64) {
|
||||
if (native_arch.isSPARC()) {
|
||||
// Flush all the register windows on stack.
|
||||
asm volatile (
|
||||
\\ flushw
|
||||
asm volatile (if (std.Target.sparc.featureSetHas(builtin.cpu.features, .v9))
|
||||
"flushw"
|
||||
else
|
||||
"ta 3" // ST_FLUSH_WINDOWS
|
||||
::: "memory");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user