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/04/15 15:14:45 UTC

[GitHub] [incubator-nuttx-apps] anchao opened a new pull request, #1141: testing/ostest: remove CONFIG_TESTING_OSTEST_FPUSIZE

anchao opened a new pull request, #1141:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1141

   
   ## Summary
   
   testing/ostest: remove CONFIG_TESTING_OSTEST_FPUSIZE
   
   fptest should not need to care about the size of FPU
   
   Signed-off-by: chao.an <an...@xiaomi.com>
   
   ## Impact
   fpu test
   
   ## Testing
    ./tools/configure.sh sabre-6quad/smp
   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-apps] anchao commented on pull request #1141: testing/ostest: remove CONFIG_TESTING_OSTEST_FPUSIZE

Posted by GitBox <gi...@apache.org>.
anchao commented on PR #1141:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1141#issuecomment-1100169023

   Depends on: https://github.com/apache/incubator-nuttx/pull/6080


-- 
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-apps] xiaoxiang781216 merged pull request #1141: testing/ostest: remove CONFIG_TESTING_OSTEST_FPUSIZE

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


-- 
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-apps] xiaoxiang781216 commented on a diff in pull request #1141: testing/ostest: remove CONFIG_TESTING_OSTEST_FPUSIZE

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1141:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1141#discussion_r851332511


##########
testing/ostest/fpu.c:
##########
@@ -211,8 +179,8 @@ static int fpu_task(int argc, char *argv[])
        * that we can verify that reading of the registers actually occurs.
        */
 
-      memset(fpu->save1, 0xff, FPU_WORDSIZE * sizeof(uint32_t));
-      memset(fpu->save2, 0xff, FPU_WORDSIZE * sizeof(uint32_t));
+      memset(fpu->save1, 0xff, XCPTCONTEXT_REGS * sizeof(uint32_t));

Review Comment:
   uint32_t->uintptr_t



##########
testing/ostest/fpu.c:
##########
@@ -153,14 +121,14 @@ static void fpu_dump(FAR uint32_t *buffer, FAR const char *msg)
   int k;
 
   printf("%s (%p):\n", msg, buffer);
-  for (i = 0; i < FPU_WORDSIZE; i += 8)
+  for (i = 0; i < XCPTCONTEXT_REGS; i += 8)
     {
       printf("    %04x: ", i);
       for (j = 0; j < 8; j++)
         {
           k = i + j;
 
-          if (k < FPU_WORDSIZE)
+          if (k < XCPTCONTEXT_REGS)

Review Comment:
   PRIx32 ->PRIxPTR



##########
testing/ostest/fpu.c:
##########
@@ -211,8 +179,8 @@ static int fpu_task(int argc, char *argv[])
        * that we can verify that reading of the registers actually occurs.
        */
 
-      memset(fpu->save1, 0xff, FPU_WORDSIZE * sizeof(uint32_t));
-      memset(fpu->save2, 0xff, FPU_WORDSIZE * sizeof(uint32_t));
+      memset(fpu->save1, 0xff, XCPTCONTEXT_REGS * sizeof(uint32_t));
+      memset(fpu->save2, 0xff, XCPTCONTEXT_REGS * sizeof(uint32_t));

Review Comment:
   ditto



##########
testing/ostest/fpu.c:
##########
@@ -81,43 +76,16 @@
 
 /* Other definitions ********************************************************/
 
-/* We'll keep all data using 32-bit values only to force 32-bit alignment.
- * This logic has no real notion of the underlying representation.
- */
-
-#define FPU_WORDSIZE ((CONFIG_TESTING_OSTEST_FPUSIZE+3)>>2)
 #define FPU_NTHREADS  2
 
-/****************************************************************************
- * External Dependencies
- ****************************************************************************/
-
-/* This test is very dependent on support provided by the chip/board-
- * layer logic.  In particular, it expects the following functions
- * to be provided:
- */
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function
- * will return the current FPU registers.
- */
-
-extern void arch_getfpu(FAR uint32_t *fpusave);
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this
- * function will compare them and return true if they are identical.
- */
-
-extern bool arch_cmpfpu(FAR const uint32_t *fpusave1,
-                        FAR const uint32_t *fpusave2);
-
 /****************************************************************************
  * Private Types
  ****************************************************************************/
 
 struct fpu_threaddata_s
 {
-  uint32_t save1[FPU_WORDSIZE];
-  uint32_t save2[FPU_WORDSIZE];
+  uint32_t save1[XCPTCONTEXT_REGS];

Review Comment:
   uint32_t->uintptr_t



-- 
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-apps] anchao commented on a diff in pull request #1141: testing/ostest: remove CONFIG_TESTING_OSTEST_FPUSIZE

Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #1141:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1141#discussion_r851356731


##########
testing/ostest/fpu.c:
##########
@@ -211,8 +179,8 @@ static int fpu_task(int argc, char *argv[])
        * that we can verify that reading of the registers actually occurs.
        */
 
-      memset(fpu->save1, 0xff, FPU_WORDSIZE * sizeof(uint32_t));
-      memset(fpu->save2, 0xff, FPU_WORDSIZE * sizeof(uint32_t));
+      memset(fpu->save1, 0xff, XCPTCONTEXT_REGS * sizeof(uint32_t));

Review Comment:
   Done



##########
testing/ostest/fpu.c:
##########
@@ -211,8 +179,8 @@ static int fpu_task(int argc, char *argv[])
        * that we can verify that reading of the registers actually occurs.
        */
 
-      memset(fpu->save1, 0xff, FPU_WORDSIZE * sizeof(uint32_t));
-      memset(fpu->save2, 0xff, FPU_WORDSIZE * sizeof(uint32_t));
+      memset(fpu->save1, 0xff, XCPTCONTEXT_REGS * sizeof(uint32_t));
+      memset(fpu->save2, 0xff, XCPTCONTEXT_REGS * sizeof(uint32_t));

Review Comment:
   Done



##########
testing/ostest/fpu.c:
##########
@@ -153,14 +121,14 @@ static void fpu_dump(FAR uint32_t *buffer, FAR const char *msg)
   int k;
 
   printf("%s (%p):\n", msg, buffer);
-  for (i = 0; i < FPU_WORDSIZE; i += 8)
+  for (i = 0; i < XCPTCONTEXT_REGS; i += 8)
     {
       printf("    %04x: ", i);
       for (j = 0; j < 8; j++)
         {
           k = i + j;
 
-          if (k < FPU_WORDSIZE)
+          if (k < XCPTCONTEXT_REGS)

Review Comment:
   Done



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