]> git.saurik.com Git - apple/xnu.git/blob - tests/posix_spawn_archpref_helper.c
xnu-7195.81.3.tar.gz
[apple/xnu.git] / tests / posix_spawn_archpref_helper.c
1 #include <spawn.h>
2 /*
3 * Returns the subcpu type for the architecture for which the
4 * binary was compiled.
5 */
6 int
7 main(void)
8 {
9 #if defined(__x86_64__)
10 return CPU_SUBTYPE_X86_64_ALL;
11 #elif __arm64e__
12 return CPU_SUBTYPE_ARM64E;
13 #elif defined(__arm64__) && defined(__LP64__)
14 return CPU_SUBTYPE_ARM64_ALL;
15 #elif defined(__arm64__)
16 return CPU_SUBTYPE_ARM64_32_ALL;
17 #elif defined(__arm__)
18 return CPU_SUBTYPE_ARM_V7K;
19 #else
20 #error unknown architecture
21 #endif
22 }