mirror of
https://gitee.com/cosyos/cosyos.git
synced 2026-08-17 08:42:13 +08:00
update Port/port_x32/RISC-V32/port_rv32_HWS.S.
Signed-off-by: 零中断延迟的RTOS <cosyos@139.com>
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* @brief RISC-V32 Core Port File for Hardware Stack
|
||||
* @note x4(tp)寄存器专用于任务切换,不允许用户使用。
|
||||
* @author 迟凯峰
|
||||
* @version v3.0.2
|
||||
* @date 2026.08.02
|
||||
* @version v3.0.3
|
||||
* @date 2026.08.04
|
||||
******************************************************************************/
|
||||
|
||||
#include "syscfg.h"
|
||||
@@ -199,9 +199,9 @@ _task_switch_:
|
||||
fload f31, 31 * MCUCFG_FPUBYTES(sp)
|
||||
addi sp, sp, 32 * MCUCFG_FPUBYTES
|
||||
#endif
|
||||
/* pop mepc */
|
||||
/* pop mepc to mscratch */
|
||||
load a0, 0 * MCUCFG_REGBYTES(sp)
|
||||
csrw mepc, a0
|
||||
csrw mscratch, a0
|
||||
|
||||
/* pop Caller & Callee */
|
||||
load x1, 1 * MCUCFG_REGBYTES(sp)
|
||||
@@ -239,6 +239,6 @@ _task_switch_:
|
||||
#endif
|
||||
|
||||
sw zero, (tp)
|
||||
csrr tp, mepc
|
||||
csrr tp, mscratch
|
||||
jr tp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user