Friday, September 21, 2012

architecture cputype (16777228) cpusubtype (0)

otool -h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/crt1.o

Output is

/SDKs/iPhoneOS7.0.sdk/usr/lib/crt1.o (architecture arm64):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
 0xfeedfacf 16777228         0  0x00          1     4        288 0x00002000

/SDKs/iPhoneOS7.0.sdk/usr/lib/crt1.o (architecture armv7):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
 0xfeedface      12          9  0x00          1     5        532 0x00002000

/SDKs/iPhoneOS7.0.sdk/usr/lib/crt1.o (architecture armv7s):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
 0xfeedface      12         11   0x00          1     5        532 0x00002000

/SDKs/iPhoneOS7.0.sdk/usr/lib/crt1.o (architecture armv7f):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
 0xfeedface      12         10  0x00          1     5        532 0x00002000

/SDKs/iPhoneOS7.0.sdk/usr/lib/crt1.o (architecture armv7k):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
 0xfeedface      12         12  0x00          1     5        532 0x00002000




grep CPU.*TYPE_ARM /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/mach/machine.h

Output is

#define CPU_ARCH_ABI64   0x01000000  /* 64 bit ABI */
#define CPU_TYPE_ARM    ((cpu_type_t) 12)
#define CPU_TYPE_ARM64  (CPU_TYPE_ARM | CPU_ARCH_ABI64)   /* 0x0100000C = 16777228 */

#define CPU_SUBTYPE_ARM_ALL   ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_ARM_V6    ((cpu_subtype_t) 6)                     /* armv6 */
#define CPU_SUBTYPE_ARM_V7    ((cpu_subtype_t) 9)              /* (armv7 */
#define CPU_SUBTYPE_ARM_V7F   ((cpu_subtype_t) 10) /* Cortex A9 */
#define CPU_SUBTYPE_ARM_V7S   ((cpu_subtype_t) 11) /* Swift */ /* armv7s */
#define CPU_SUBTYPE_ARM_V7K   ((cpu_subtype_t) 12) /* Kirkwood40 */
#define CPU_SUBTYPE_ARM_V6M   ((cpu_subtype_t) 14) /* Not meant to be run under xnu */
#define CPU_SUBTYPE_ARM_V7M   ((cpu_subtype_t) 15) /* Not meant to be run under xnu */
#define CPU_SUBTYPE_ARM_V7EM  ((cpu_subtype_t) 16) /* Not meant to be run under xnu */
#define CPU_SUBTYPE_ARM_V8    ((cpu_subtype_t) 13)

#define CPU_SUBTYPE_ARM64_ALL           ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_ARM64_V8            ((cpu_subtype_t) 1)



No comments: