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 2021/09/16 02:32:46 UTC

[incubator-nuttx] 02/04: xtensa:arch: force up_getsp to inline

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/incubator-nuttx.git

commit 3acdbef60d23f1196c233352d991f30b69d9714f
Author: zhuyanlin <zh...@xiaomi.com>
AuthorDate: Wed Sep 15 14:55:27 2021 +0800

    xtensa:arch: force up_getsp to inline
    
    Up_getsp may be not inline in gcc, thus get the sp
    is up_getsp function's sp, not the caller function.
    
    Signed-off-by: zhuyanlin <zh...@xiaomi.com>
---
 arch/xtensa/include/arch.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/xtensa/include/arch.h b/arch/xtensa/include/arch.h
index a96fc1a..7b40c4b 100644
--- a/arch/xtensa/include/arch.h
+++ b/arch/xtensa/include/arch.h
@@ -47,6 +47,7 @@
  * Name: up_getsp
  ****************************************************************************/
 
+static inline uint32_t up_getsp(void) inline_function;
 static inline uint32_t up_getsp(void)
 {
   register uint32_t sp;