Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: riscv: Simplify SP setup in setup_unwind_user_mode()
The parameter "regs" is the stack pointer which is allocated to store system call registers when calling thread_scall_handler(). Thus, we can simply get the original stack pointer by "regs + 1" equation, and use it to exit user mode. The code is referenced from ARM's setup_unwind_user_mode(). Signed-off-by: Alvin Chang <alvinga@andestech.com>
- Loading branch information