update Port/port_x32/RISC-V32/port_rv32_HWS.S.

Signed-off-by: 零中断延迟的RTOS <cosyos@139.com>
This commit is contained in:
零中断延迟的RTOS
2026-08-04 16:39:01 +00:00
committed by Gitee
parent 0a0eaf4cd0
commit fd3e2460f8
+12
View File
@@ -24,6 +24,11 @@
.align 2
OS_PendSV_Handler: // hardware push Caller
#if defined ( __TEST_PENDSV )
la tp, test_pendsv_fault_handler
csrw mscratch, tp
#endif
/* push Callee */
#if !defined ( __riscv_32e )
addi sp, sp,-32 * MCUCFG_REGBYTES
@@ -153,6 +158,7 @@ _task_switch_:
fstore f30, 30 * MCUCFG_FPUBYTES(sp)
fstore f31, 31 * MCUCFG_FPUBYTES(sp)
#endif
/* switch */
la t0, s_task_current
lw t2, (t0)
@@ -163,6 +169,12 @@ _task_switch_:
lw sp, (t2)
sw t2, (t0)
#if defined ( __TEST_PENDSV )
li a0, (0x0001UL << (MCUCFG_XXXx_IRQn % 32) )
li a1, (0xE000E200 + MCUCFG_XXXx_IRQn / 32 * 4)
sw a0, (a1)
#endif
/* pop FPU */
#if (MCUCFG_FPU_AUTOSTORE == 1)
fload f0, 0 * MCUCFG_FPUBYTES(sp)