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 2021/12/29 03:19:08 UTC

[GitHub] [incubator-nuttx] no1wudi opened a new pull request #5103: arch/risc-v: Refine riscv_fpu.S

no1wudi opened a new pull request #5103:
URL: https://github.com/apache/incubator-nuttx/pull/5103


   ## Summary
   Merge riscv_fpu.S in rv32im and rv64gc into one.
   ## Impact
   Refator only
   ## Testing
   CI and rv32-virt:ostest
   


-- 
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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #5103: arch/risc-v: Refine riscv_fpu.S

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #5103:
URL: https://github.com/apache/incubator-nuttx/pull/5103


   


-- 
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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5103: arch/risc-v: Refine riscv_fpu.S

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5103:
URL: https://github.com/apache/incubator-nuttx/pull/5103#discussion_r776161182



##########
File path: arch/risc-v/src/common/riscv_fpu.S
##########
@@ -95,7 +108,7 @@ up_fpuconfig:
  *   floating point registers.
  *
  * C Function Prototype:
- *   void riscv_savefpu(uint64_t *regs);
+ *   void riscv_savefpu(uintptr_t *regs);

Review comment:
       should we change the prototype in up_internal.h:
   ```
   #ifdef CONFIG_ARCH_FPU
   #ifdef CONFIG_ARCH_RV64
   void riscv_savefpu(uint64_t *regs);
   void riscv_restorefpu(const uint64_t *regs);
   #else /* !CONFIG_ARCH_RV64 */
   void riscv_savefpu(uint32_t *regs);
   void riscv_restorefpu(const uint32_t *regs);
   #endif /* CONFIG_ARCH_RV64 */
   #else
   #  define riscv_savefpu(regs)
   #  define riscv_restorefpu(regs)
   #endif
   ```
   to:
   ```
   #ifdef CONFIG_ARCH_FPU
   void riscv_savefpu(uintptr_t *regs);
   void riscv_restorefpu(const uintptr_t *regs);
   #else
   #  define riscv_savefpu(regs)
   #  define riscv_restorefpu(regs)
   #endif
   ```




-- 
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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5103: arch/risc-v: Refine riscv_fpu.S

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5103:
URL: https://github.com/apache/incubator-nuttx/pull/5103#discussion_r776161182



##########
File path: arch/risc-v/src/common/riscv_fpu.S
##########
@@ -95,7 +108,7 @@ up_fpuconfig:
  *   floating point registers.
  *
  * C Function Prototype:
- *   void riscv_savefpu(uint64_t *regs);
+ *   void riscv_savefpu(uintptr_t *regs);

Review comment:
       should we change the prototype in up_internal.h:
   ```
   #ifdef CONFIG_ARCH_FPU
   #ifdef CONFIG_ARCH_RV64
   void riscv_savefpu(uint64_t *regs);
   void riscv_restorefpu(const uint64_t *regs);
   #else /* !CONFIG_ARCH_RV64 */
   void riscv_savefpu(uint32_t *regs);
   void riscv_restorefpu(const uint32_t *regs);
   #endif /* CONFIG_ARCH_RV64 */
   #else
   #  define riscv_savefpu(regs)
   #  define riscv_restorefpu(regs)
   #endif
   ```
   to:
   #ifdef CONFIG_ARCH_FPU
   void riscv_savefpu(uintptr_t *regs);
   void riscv_restorefpu(const uintptr_t *regs);
   #else
   #  define riscv_savefpu(regs)
   #  define riscv_restorefpu(regs)
   #endif
   

##########
File path: arch/risc-v/src/common/riscv_fpu.S
##########
@@ -23,7 +23,12 @@
  ************************************************************************************/
 
 #include <nuttx/config.h>
+
+#ifdef CONFIG_ARCH_RV32
+#include <arch/rv32im/irq.h>

Review comment:
       let's merge irq.h in the future patch.




-- 
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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5103: arch/risc-v: Refine riscv_fpu.S

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5103:
URL: https://github.com/apache/incubator-nuttx/pull/5103#discussion_r776183572



##########
File path: arch/risc-v/src/common/riscv_fpu.S
##########
@@ -95,7 +108,7 @@ up_fpuconfig:
  *   floating point registers.
  *
  * C Function Prototype:
- *   void riscv_savefpu(uint64_t *regs);
+ *   void riscv_savefpu(uintptr_t *regs);

Review comment:
       Ok, let's do in the next refactor PR.




-- 
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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5103: arch/risc-v: Refine riscv_fpu.S

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5103:
URL: https://github.com/apache/incubator-nuttx/pull/5103#discussion_r776161182



##########
File path: arch/risc-v/src/common/riscv_fpu.S
##########
@@ -95,7 +108,7 @@ up_fpuconfig:
  *   floating point registers.
  *
  * C Function Prototype:
- *   void riscv_savefpu(uint64_t *regs);
+ *   void riscv_savefpu(uintptr_t *regs);

Review comment:
       should we change the prototype in up_internal.h:
   ```
   #ifdef CONFIG_ARCH_FPU
   #ifdef CONFIG_ARCH_RV64
   void riscv_savefpu(uint64_t *regs);
   void riscv_restorefpu(const uint64_t *regs);
   #else /* !CONFIG_ARCH_RV64 */
   void riscv_savefpu(uint32_t *regs);
   void riscv_restorefpu(const uint32_t *regs);
   #endif /* CONFIG_ARCH_RV64 */
   #else
   #  define riscv_savefpu(regs)
   #  define riscv_restorefpu(regs)
   #endif
   ```
   to:
   ···
   #ifdef CONFIG_ARCH_FPU
   void riscv_savefpu(uintptr_t *regs);
   void riscv_restorefpu(const uintptr_t *regs);
   #else
   #  define riscv_savefpu(regs)
   #  define riscv_restorefpu(regs)
   #endif
   ···




-- 
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



[GitHub] [incubator-nuttx] no1wudi commented on a change in pull request #5103: arch/risc-v: Refine riscv_fpu.S

Posted by GitBox <gi...@apache.org>.
no1wudi commented on a change in pull request #5103:
URL: https://github.com/apache/incubator-nuttx/pull/5103#discussion_r776163562



##########
File path: arch/risc-v/src/common/riscv_fpu.S
##########
@@ -95,7 +108,7 @@ up_fpuconfig:
  *   floating point registers.
  *
  * C Function Prototype:
- *   void riscv_savefpu(uint64_t *regs);
+ *   void riscv_savefpu(uintptr_t *regs);

Review comment:
       Yes, but it would lead to many warnings, it can be done while merging arch.h/irq.h/mcause.h/syscall.h.




-- 
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



[GitHub] [incubator-nuttx] no1wudi commented on a change in pull request #5103: arch/risc-v: Refine riscv_fpu.S

Posted by GitBox <gi...@apache.org>.
no1wudi commented on a change in pull request #5103:
URL: https://github.com/apache/incubator-nuttx/pull/5103#discussion_r776163117



##########
File path: arch/risc-v/src/common/riscv_fpu.S
##########
@@ -23,7 +23,12 @@
  ************************************************************************************/
 
 #include <nuttx/config.h>
+
+#ifdef CONFIG_ARCH_RV32
+#include <arch/rv32im/irq.h>

Review comment:
       Yes, I'll do it step by step.




-- 
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