Can someone help me port fiber lib to riscv64.
I am not very understand the concept of the lib.
https://github.com/bytecodealliance/wasmtime/pull/4271#issuecomment-1186734601
thanks.
I might be able to answer general questions, but nothing RISC-V-specific. Since you say that you don't understand the concept of the crate, are you aware of the general concept of a fiber?
The wasmtime_fiber_switch()
function is executed after one fiber yields, and there is another runnable fiber. wasmtime_fiber_init()
is a fiber creation routine, or at least contains the bits that must be implemented in assembly.
right now . only unwinding stack not working.
image.png
https://github.com/yuyang-ok/wasmtime/blob/risc-v/crates/fiber/src/unix/riscv64.rs
I am wondering if something wrong with sp pointer, since sp is callee-save register.
But looks didnot restore.
I am wondering if something wrong with sp pointer, since sp is callee-save register.
But looks didnot restore.
@yang yu a stack-swapping context switch (what the fiber switch routine is doing) saves/restores SP right in the middle, as it switches to the new one; or do I misunderstand the issue? In any case, great that fibers are working now!
unwinds not working usually are going to be caused by incorrect cfi somewhere.
@Chris Fallin I have switch sp in assembly code. sp didnot restore I means sp didnot restore when unwinding the stack.
I have another question at.
https://stackoverflow.com/questions/73232295/how-dwarf-format-caculate-provious-sp-pointer
@yang yu it's probably best to ask @Alex Crichton , he set up the CFI directives in wasmtime-fiber I think
yes , but He still have no time.
yang yu has marked this topic as resolved.
Last updated: Nov 22 2024 at 17:03 UTC