[PATCH 18/23] sp19: Eliminate warnings

Joel Sherrill joel.sherrill at oarcorp.com
Wed Sep 3 15:26:12 UTC 2014


---
 testsuites/sptests/sp19/fptask.c |  6 +----
 testsuites/sptests/sp19/fptest.h | 49 ++++++++++++----------------------------
 2 files changed, 16 insertions(+), 39 deletions(-)

diff --git a/testsuites/sptests/sp19/fptask.c b/testsuites/sptests/sp19/fptask.c
index 979182f..3ff7340 100644
--- a/testsuites/sptests/sp19/fptask.c
+++ b/testsuites/sptests/sp19/fptask.c
@@ -41,11 +41,7 @@ rtems_task FP_task(
     INTEGER_factors[ task_index ]
   );
   put_name( Task_name[ task_index ], FALSE );
-  #if ( RTEMS_HAS_HARDWARE_FP == 1 )
-    printf( " - float base = (%g)\n", FP_factors[ task_index ] );
-  #else
-    printf( " - float base = (NA)\n" );
-  #endif
+  printf( " - float base = (%g)\n", FP_factors[ task_index ] );
 
   previous_seconds = (uint32_t)-1;
 
diff --git a/testsuites/sptests/sp19/fptest.h b/testsuites/sptests/sp19/fptest.h
index 77c3265..285b5dd 100644
--- a/testsuites/sptests/sp19/fptest.h
+++ b/testsuites/sptests/sp19/fptest.h
@@ -1,20 +1,22 @@
-/*  fptest.h
+/**
+ * @file
+ * @brief Floating Point Register Pressure and Check
  *
- *  This include file contains the CPU dependent implementation
- *  of the following routines needed to test RTEMS floating
- *  point support:
- *           FP_load( &context )
- *           FP_check( &context )
+ * This include file contains the implementation of the following
+ * routines needed to test RTEMS floating point support:
  *
- *  FP_load   - loads the specified floating point context
- *  FP_check  - checks the specified floating point context
+ *    FP_load( &context )
+ *    FP_check( &context )
  *
- *  NOTE:  These routines are VERY CPU dependent and are thus
- *         located in in the CPU dependent include file
- *         fptest.h.  These routines form the core of the
- *         floating point context switch test.
+ * FP_load   - loads the specified floating point context
+ * FP_check  - checks the specified floating point context
  *
- *  COPYRIGHT (c) 1989-1999.
+ * Whether the CPU model has hardware or software floating point,
+ * these methods should put load on the floating point register set.
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2014.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -28,25 +30,6 @@
 
 #include <stdio.h>
 
-#ifndef RTEMS_HAS_HARDWARE_FP
-#error "This CPU does not have RTEMS_HAS_HARDWARE_FP defined"
-#endif
-
-#if ( RTEMS_HAS_HARDWARE_FP == FALSE )
-
-/*
- *  The following is useless except to avoid some warnings.
- */
-
-#define FP_DECLARE unsigned int fp01 = 0;
-#define FP_LOAD( _factor ) fp01 = 2;
-#define FP_CHECK( _factor ) \
-   if ( fp01 != 2 ) \
-          printf("%" PRIu32 ": single integer is wrong -- (%d != 2) \n", \
-             task_index, fp01 );  \
-
-#else
-
 #define FP_DECLARE \
     double  fp01 = 1.0; \
     double  fp02 = 2.0; \
@@ -165,5 +148,3 @@
     } while (0)
 
 #endif
-
-#endif
-- 
1.9.3




More information about the devel mailing list