CMSIS-DSP: Improved test framework
Added gcc support to IPSS in test framework.
Improved f16 handling for when compiling M55 with gcc.
diff --git a/CMSIS/DSP/Testing/main.cpp b/CMSIS/DSP/Testing/main.cpp
index 559b1c2..37df76b 100644
--- a/CMSIS/DSP/Testing/main.cpp
+++ b/CMSIS/DSP/Testing/main.cpp
@@ -1,10 +1,73 @@
-#include <stdio.h>
+#include <cstdio>
#include "arm_math.h"
extern int testmain(const char *);
extern "C" const char *patternData;
+//! \note for IAR
+#ifdef __IS_COMPILER_IAR__
+# undef __IS_COMPILER_IAR__
+#endif
+#if defined(__IAR_SYSTEMS_ICC__)
+# define __IS_COMPILER_IAR__ 1
+#endif
+
+
+
+
+//! \note for arm compiler 5
+#ifdef __IS_COMPILER_ARM_COMPILER_5__
+# undef __IS_COMPILER_ARM_COMPILER_5__
+#endif
+#if ((__ARMCC_VERSION >= 5000000) && (__ARMCC_VERSION < 6000000))
+# define __IS_COMPILER_ARM_COMPILER_5__ 1
+#endif
+//! @}
+
+//! \note for arm compiler 6
+#ifdef __IS_COMPILER_ARM_COMPILER_6__
+# undef __IS_COMPILER_ARM_COMPILER_6__
+#endif
+#if ((__ARMCC_VERSION >= 6000000) && (__ARMCC_VERSION < 7000000))
+# define __IS_COMPILER_ARM_COMPILER_6__ 1
+#endif
+
+#ifdef __IS_COMPILER_LLVM__
+# undef __IS_COMPILER_LLVM__
+#endif
+#if defined(__clang__) && !__IS_COMPILER_ARM_COMPILER_6__
+# define __IS_COMPILER_LLVM__ 1
+#else
+//! \note for gcc
+#ifdef __IS_COMPILER_GCC__
+# undef __IS_COMPILER_GCC__
+#endif
+#if defined(__GNUC__) && !(__IS_COMPILER_ARM_COMPILER_6__ || __IS_COMPILER_LLVM__)
+# define __IS_COMPILER_GCC__ 1
+#endif
+//! @}
+#endif
+//! @}
+
+#if defined(ARMCM33_DSP_FP) && defined(__IS_COMPILER_GCC__)
+extern "C" void _exit(int return_code);
+#endif
+
int main()
{
- return(testmain(patternData));
+ int r;
+
+ r=testmain(patternData);
+
+ /*
+
+ Temporary solution to solve problems with IPSS support for M33.
+
+ */
+
+ #if defined(ARMCM33_DSP_FP) && defined(__IS_COMPILER_GCC__)
+ _exit(r);
+ #endif
+
+ return(r);
}