1 /* 2 * Copyright 2008, François Revol, revol@free.fr. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef SYSTEM_ARCH_ARM_ARCH_ARM_VERSION_H 6 #define SYSTEM_ARCH_ARM_ARCH_ARM_VERSION_H 7 8 /* map all the various ARM defines to arch version to allow checking for minimal arch */ 9 10 #if defined(__ARM_ARCH_2__) || defined(__ARM_ARCH_3__) 11 #error we do not support this 12 #endif 13 14 #if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) 15 #define __ARM_ARCH__ 4 16 #endif 17 18 #if defined(__ARM_ARCH_5__) \ 19 || defined(__ARM_ARCH_5E__) \ 20 || defined(__ARM_ARCH_5T__) \ 21 || defined(__ARM_ARCH_5TE__) \ 22 || defined(__ARM_ARCH_5TEJ__) 23 #define __ARM_ARCH__ 5 24 #endif 25 26 #if defined(__ARM_ARCH_6__) \ 27 || defined(__ARM_ARCH_6J__) \ 28 || defined(__ARM_ARCH_6K__) \ 29 || defined(__ARM_ARCH_6ZK__) \ 30 || defined(__ARM_ARCH_6T2__) 31 #define __ARM_ARCH__ 6 32 #endif 33 34 #if defined(__ARM_ARCH_7__) \ 35 || defined(__ARM_ARCH_7A__) \ 36 || defined(__ARM_ARCH_7R__) \ 37 || defined(__ARM_ARCH_7M__) 38 #define __ARM_ARCH__ 7 39 #endif 40 41 #ifndef __ARM_ARCH__ 42 #error cannot determine arm arch version 43 #endif 44 45 #endif /* SYSTEM_ARCH_ARM_ARCH_ARM_VERSION_H */ 46 47