You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/11/21 15:56:27 UTC

(nuttx) branch master updated: arm64_vector: no need to save x0 to sp

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 6e604741f6 arm64_vector: no need to save x0 to sp
6e604741f6 is described below

commit 6e604741f652c5c9a3099e067316f1efc30b0f96
Author: liaoao <li...@xiaomi.com>
AuthorDate: Tue Oct 17 14:32:39 2023 +0800

    arm64_vector: no need to save x0 to sp
    
    It will cause an incorrect sp value saved in context when saving X0 to sp.
    
    Signed-off-by: liaoao <li...@xiaomi.com>
---
 arch/arm64/src/common/arm64_vectors.S | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm64/src/common/arm64_vectors.S b/arch/arm64/src/common/arm64_vectors.S
index 08b6a6f901..e6541b519c 100644
--- a/arch/arm64/src/common/arm64_vectors.S
+++ b/arch/arm64/src/common/arm64_vectors.S
@@ -70,7 +70,6 @@
  ****************************************************************************/
 GTEXT(up_saveusercontext)
 SECTION_FUNC(text, up_saveusercontext)
-    str    x0, [sp, #-16]!
 
     stp    x0,  x1,  [x0, #8 * REG_X0]
     stp    x2,  x3,  [x0, #8 * REG_X2]
@@ -99,8 +98,6 @@ SECTION_FUNC(text, up_saveusercontext)
 
     arm64_exception_context_save x4 x5 x0
 
-    ldr    x0, [sp], #16
-
     ret
 
 /****************************************************************************