Created
October 7, 2015 12:48
-
-
Save ytlvy/a20f5bc7a49017dc7ef4 to your computer and use it in GitHub Desktop.
__arm64__ 、__arm__宏判断平台架构
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 参考官方判断方法:http://www.opensource.apple.com/source/cctools/cctools-870/include/mach/arm/thread_status.h | |
void checkArch(){ | |
#if defined (__arm64__)/* || defined (__aarch64__) */ | |
printf("[PiaoYun]running 64-bit [__arm64__ arch]\n"); | |
#elif defined(__arm64__) | |
printf("[PiaoYun]runing 32-bit [__arm__ arch]\n"); | |
#else | |
#error [PiaoYun]Unknown arch | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment