def is_arch_armv7():
"""Check for ARMv7 instructions"""
cc_macros_cache = cc_macros()
- return ('__ARM_ARCH_7__' in cc_macros_cache or
- '__ARM_ARCH_7A__' in cc_macros_cache or
- '__ARM_ARCH_7R__' in cc_macros_cache or
- '__ARM_ARCH_7M__' in cc_macros_cache or
- '__ARM_ARCH_7S__' in cc_macros_cache)
+ return cc_macros_cache.get('__ARM_ARCH') == '7'
def is_arch_armv6():
"""Check for ARMv6 instructions"""
cc_macros_cache = cc_macros()
- return ('__ARM_ARCH_6__' in cc_macros_cache or
- '__ARM_ARCH_6M__' in cc_macros_cache)
+ return cc_macros_cache.get('__ARM_ARCH') == '6'
def is_arm_hard_float_abi():