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

xiaoxiang 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 99b364c880 x86_64: fix regression
99b364c880 is described below

commit 99b364c880b4fc0b97933a1fe0c538bda7241ea6
Author: hujun5 <[email protected]>
AuthorDate: Tue Oct 8 11:25:57 2024 +0800

    x86_64: fix regression
    
    This commit fixes the regression from 
https://github.com/apache/nuttx/pull/13768
    
    Signed-off-by: hujun5 <[email protected]>
---
 arch/x86_64/src/intel64/intel64_schedulesigaction.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86_64/src/intel64/intel64_schedulesigaction.c 
b/arch/x86_64/src/intel64/intel64_schedulesigaction.c
index d9d01d23ef..d560ca65a7 100644
--- a/arch/x86_64/src/intel64/intel64_schedulesigaction.c
+++ b/arch/x86_64/src/intel64/intel64_schedulesigaction.c
@@ -157,7 +157,7 @@ void up_schedule_sigaction(struct tcb_s *tcb)
        */
 
       tcb->xcp.regs[REG_RIP]    = (uint64_t)x86_64_sigdeliver;
-      tcb->xcp.regs[REG_RIP]    = tcb->xcp.regs[REG_RIP] - 8;
+      tcb->xcp.regs[REG_RSP]    = tcb->xcp.regs[REG_RSP] - 8;
       tcb->xcp.regs[REG_RFLAGS] = 0;
     }
 }
@@ -219,7 +219,7 @@ void up_schedule_sigaction(struct tcb_s *tcb)
            */
 
           up_current_regs()[REG_RIP]    = (uint64_t)x86_64_sigdeliver;
-          up_current_regs()[REG_RIP]    = up_current_regs()[REG_RIP] - 8;
+          up_current_regs()[REG_RSP]    = up_current_regs()[REG_RSP] - 8;
           up_current_regs()[REG_RFLAGS] = 0;
 
           /* And make sure that the saved context in the TCB

Reply via email to