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