Christophe Favergeon | feb7393 | 2020-05-20 14:48:06 +0200 | [diff] [blame^] | 1 | #include <cstdio> |
Christophe Favergeon | d99acab | 2020-05-11 13:40:39 +0200 | [diff] [blame] | 2 | #include "arm_math.h" |
| 3 | extern int testmain(const char *); |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 4 | |
Christophe Favergeon | d99acab | 2020-05-11 13:40:39 +0200 | [diff] [blame] | 5 | extern "C" const char *patternData; |
Christophe Favergeon | 3f7bbfb | 2020-05-06 07:10:29 +0200 | [diff] [blame] | 6 | |
Christophe Favergeon | feb7393 | 2020-05-20 14:48:06 +0200 | [diff] [blame^] | 7 | //! \note for IAR |
| 8 | #ifdef __IS_COMPILER_IAR__ |
| 9 | # undef __IS_COMPILER_IAR__ |
| 10 | #endif |
| 11 | #if defined(__IAR_SYSTEMS_ICC__) |
| 12 | # define __IS_COMPILER_IAR__ 1 |
| 13 | #endif |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | //! \note for arm compiler 5 |
| 19 | #ifdef __IS_COMPILER_ARM_COMPILER_5__ |
| 20 | # undef __IS_COMPILER_ARM_COMPILER_5__ |
| 21 | #endif |
| 22 | #if ((__ARMCC_VERSION >= 5000000) && (__ARMCC_VERSION < 6000000)) |
| 23 | # define __IS_COMPILER_ARM_COMPILER_5__ 1 |
| 24 | #endif |
| 25 | //! @} |
| 26 | |
| 27 | //! \note for arm compiler 6 |
| 28 | #ifdef __IS_COMPILER_ARM_COMPILER_6__ |
| 29 | # undef __IS_COMPILER_ARM_COMPILER_6__ |
| 30 | #endif |
| 31 | #if ((__ARMCC_VERSION >= 6000000) && (__ARMCC_VERSION < 7000000)) |
| 32 | # define __IS_COMPILER_ARM_COMPILER_6__ 1 |
| 33 | #endif |
| 34 | |
| 35 | #ifdef __IS_COMPILER_LLVM__ |
| 36 | # undef __IS_COMPILER_LLVM__ |
| 37 | #endif |
| 38 | #if defined(__clang__) && !__IS_COMPILER_ARM_COMPILER_6__ |
| 39 | # define __IS_COMPILER_LLVM__ 1 |
| 40 | #else |
| 41 | //! \note for gcc |
| 42 | #ifdef __IS_COMPILER_GCC__ |
| 43 | # undef __IS_COMPILER_GCC__ |
| 44 | #endif |
| 45 | #if defined(__GNUC__) && !(__IS_COMPILER_ARM_COMPILER_6__ || __IS_COMPILER_LLVM__) |
| 46 | # define __IS_COMPILER_GCC__ 1 |
| 47 | #endif |
| 48 | //! @} |
| 49 | #endif |
| 50 | //! @} |
| 51 | |
| 52 | #if defined(ARMCM33_DSP_FP) && defined(__IS_COMPILER_GCC__) |
| 53 | extern "C" void _exit(int return_code); |
| 54 | #endif |
| 55 | |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 56 | int main() |
| 57 | { |
Christophe Favergeon | feb7393 | 2020-05-20 14:48:06 +0200 | [diff] [blame^] | 58 | int r; |
| 59 | |
| 60 | r=testmain(patternData); |
| 61 | |
| 62 | /* |
| 63 | |
| 64 | Temporary solution to solve problems with IPSS support for M33. |
| 65 | |
| 66 | */ |
| 67 | |
| 68 | #if defined(ARMCM33_DSP_FP) && defined(__IS_COMPILER_GCC__) |
| 69 | _exit(r); |
| 70 | #endif |
| 71 | |
| 72 | return(r); |
Christophe Favergeon | c4c3480 | 2019-09-24 14:05:01 +0200 | [diff] [blame] | 73 | } |