Function init [src]
Prototype
pub fn init(first_address: ?usize, fp: ?usize) StackIterator
Parameters
first_address: ?usize
fp: ?usize
Source
pub fn init(first_address: ?usize, fp: ?usize) StackIterator {
if (native_arch.isSPARC()) {
// Flush all the register windows on stack.
asm volatile (if (std.Target.sparc.featureSetHas(builtin.cpu.features, .v9))
"flushw"
else
"ta 3" // ST_FLUSH_WINDOWS
::: "memory");
}
return StackIterator{
.first_address = first_address,
// TODO: this is a workaround for #16876
//.fp = fp orelse @frameAddress(),
.fp = fp orelse blk: {
const fa = @frameAddress();
break :blk fa;
},
};
}