This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 412931f707e arch/risc-v/src/common: fix wrong vregs access in 
up_initial_state
412931f707e is described below

commit 412931f707eed1cbce3a2c8a448a2d92c86f412e
Author: luke kun <[email protected]>
AuthorDate: Wed Sep 9 17:09:09 2026 +0800

    arch/risc-v/src/common: fix wrong vregs access in up_initial_state
    
    vregs is a member of struct xcptcontext, not tcb_s.
    
    Signed-off-by: luke kun <[email protected]>
---
 arch/risc-v/src/common/riscv_initialstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/risc-v/src/common/riscv_initialstate.c 
b/arch/risc-v/src/common/riscv_initialstate.c
index 5f65b3bcf6e..c1cd5c700c7 100644
--- a/arch/risc-v/src/common/riscv_initialstate.c
+++ b/arch/risc-v/src/common/riscv_initialstate.c
@@ -60,7 +60,7 @@ void up_initial_state(struct tcb_s *tcb)
 {
   struct xcptcontext *xcp = &tcb->xcp;
 #if defined(CONFIG_ARCH_RV_ISA_V) && (CONFIG_ARCH_RV_VECTOR_BYTE_LENGTH == 0)
-  uintptr_t *vregs = tcb->vregs;
+  uintreg_t *vregs = xcp->vregs;
 #endif
   uintptr_t regval;
   uintptr_t topstack;

Reply via email to