You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/03/09 01:25:15 UTC

[GitHub] [incubator-nuttx] no1wudi commented on a change in pull request #5695: arch/risc-v: Save/Load float register in setjmp

no1wudi commented on a change in pull request #5695:
URL: https://github.com/apache/incubator-nuttx/pull/5695#discussion_r822212602



##########
File path: libs/libc/machine/risc-v/common/arch_setjmp.S
##########
@@ -18,38 +18,64 @@
 #
 ############################################################################
 
-#if __riscv_xlen == 64
-#  define SZREG	8
+#include <nuttx/config.h>
+
+#ifdef CONFIG_ARCH_RV64
+#  define SZREG	 8
 #  define REG_S sd
 #  define REG_L ld
-#elif __riscv_xlen == 32
-#  define SZREG	4
+#elif defined(CONFIG_ARCH_RV32)
+#  define SZREG	 4
 #  define REG_S sw
 #  define REG_L lw
-#else
-#  error __riscv_xlen must equal 32 or 64
+#endif
+
+#ifdef CONFIG_ARCH_DPFPU
+#  define SZFREG   8
+#  define FREG_S fsd
+#  define FREG_L fld
+#elif defined(CONFIG_ARCH_FPU)
+#  define SZFREG   4
+#  define FREG_S fsw
+#  define FREG_L flw

Review comment:
       Done, and add some fix to DPFPU and QPFPU handling.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org