mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
Revert "arch/risc-v: Correct FPU register save area in riscv_copystate"
This reverts commit 86358bff3bc814efb564a4427b4bcd6c3c91dbf0.
This commit is contained in:
committed by
Xiang Xiao
parent
dab5bb6bd3
commit
d9607f71d2
@@ -55,6 +55,10 @@ 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:
|
||||
@@ -75,7 +79,7 @@ void riscv_copystate(uintptr_t *dest, uintptr_t *src)
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_FPU
|
||||
riscv_savefpu(dest);
|
||||
riscv_savefpu(regs);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user