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



##########
File path: libs/libc/machine/risc-v/common/arch_setjmp.S
##########
@@ -18,16 +18,26 @@
 #
 ############################################################################
 
-#if __riscv_xlen == 64
+#include <nuttx/config.h>
+
+#ifdef CONFIG_ARCH_RV64
 #  define SZREG        8
 #  define REG_S sd
 #  define REG_L ld
-#elif __riscv_xlen == 32
+#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

Review comment:
       ```suggestion
   #  define SZFREG 8
   ```

##########
File path: libs/libc/machine/risc-v/common/arch_setjmp.S
##########
@@ -18,16 +18,26 @@
 #
 ############################################################################
 
-#if __riscv_xlen == 64
+#include <nuttx/config.h>
+
+#ifdef CONFIG_ARCH_RV64
 #  define SZREG        8
 #  define REG_S sd
 #  define REG_L ld
-#elif __riscv_xlen == 32
+#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

Review comment:
       ```suggestion
   #  define SZFREG 4
   ```




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to