mirror of
https://github.com/apache/nuttx.git
synced 2026-09-07 17:36:38 +00:00
arch/risc-v: Correct FPU register save area in riscv_copystate
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
dc1b6776b9
commit
7022c630fe
1 changed files with 1 additions and 5 deletions
|
|
@ -55,10 +55,6 @@ void riscv_copystate(uintptr_t *dest, uintptr_t *src)
|
|||
{
|
||||
int i;
|
||||
|
||||
#ifdef CONFIG_ARCH_FPU
|
||||
uintptr_t *regs = dest;
|
||||
#endif
|
||||
|
||||
/* In the RISC-V model, the state is copied from the stack to the TCB,
|
||||
* but only a reference is passed to get the state from the TCB. So the
|
||||
* following check avoids copying the TCB save area onto itself:
|
||||
|
|
@ -79,7 +75,7 @@ void riscv_copystate(uintptr_t *dest, uintptr_t *src)
|
|||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_FPU
|
||||
riscv_savefpu(regs);
|
||||
riscv_savefpu(dest);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue