1 ## This test checks that the CPU subtype matching logic is handled correctly.
3 # RUN: yaml2obj %s --docnum=1 -o %t-armv6.obj
4 # RUN: yaml2obj %s --docnum=2 -o %t-armv7.obj
5 # RUN: llvm-as %p/Inputs/arm64-ios.ll -o %t-arm64.bc
6 # RUN: llvm-as %p/Inputs/armv7-ios.ll -o %t-armv7.bc
8 # RUN: llvm-libtool-darwin -static -o %t.lib %t-armv6.obj %t-armv7.obj %t-arm64.bc %t-armv7.bc -arch_only armv7
10 ## Check that only armv7 binary is present:
11 # RUN: llvm-ar t %t.lib | \
12 # RUN: FileCheck %s --check-prefix=ARM-NAMES --implicit-check-not={{.}} -DPREFIX=%basename_t.tmp
14 # ARM-NAMES: [[PREFIX]]-armv7.obj
15 # ARM-NAMES-NEXT: [[PREFIX]]-armv7.bc
17 ## Check that only armv7 symbol is present:
18 # RUN: llvm-nm --print-armap %t.lib | \
19 # RUN: FileCheck %s --check-prefix=ARM-SYMBOLS -DPREFIX=%basename_t.tmp --match-full-lines
21 # ARM-SYMBOLS: Archive map
22 # ARM-SYMBOLS-NEXT: _armv7 in [[PREFIX]]-armv7.obj
23 # ARM-SYMBOLS-NEXT: _armv7 in [[PREFIX]]-armv7.bc
27 ## CPUTYPE: CPU_TYPE_ARM
28 ## CPUSUBTYPE: CPU_SUBTYPE_ARM_V6
33 cpusubtype: 0x00000006
53 addr: 0x0000000000000000
63 content: 04D04DE208009FE500008DE504D08DE21EFF2FE100000000
84 ## CPUTYPE: CPU_TYPE_ARM
85 ## CPUSUBTYPE: CPU_SUBTYPE_ARM_V7
90 cpusubtype: 0x00000009
110 addr: 0x0000000000000000
117 reserved1: 0x00000000
118 reserved2: 0x00000000
119 reserved3: 0x00000000
120 content: 81B00020009001B07047
140 # RUN: yaml2obj %s --docnum=3 -o %t-x86_64.obj
141 # RUN: yaml2obj %s --docnum=4 -o %t-x86_64_h.obj
142 # RUN: llvm-as %p/Inputs/x86_64-osx.ll -o %t-x86_64.bc
143 # RUN: llvm-as %p/Inputs/x86_64h-osx.ll -o %t-x86_64_h.bc
145 # RUN: llvm-libtool-darwin -static -o %t.lib %t-x86_64.obj %t-x86_64_h.obj %t-x86_64.bc %t-x86_64_h.bc -arch_only x86_64
147 ## Check that only x86_64 binary is present:
148 # RUN: llvm-ar t %t.lib | \
149 # RUN: FileCheck %s --check-prefix=X86-NAMES --implicit-check-not={{.}} -DPREFIX=%basename_t.tmp
151 # X86-NAMES: [[PREFIX]]-x86_64.obj
152 # X86-NAMES-NEXT: [[PREFIX]]-x86_64.bc
154 ## Check that only x86_64 symbol is present:
155 # RUN: llvm-nm --print-armap %t.lib | \
156 # RUN: FileCheck %s --check-prefix=X86-SYMBOLS -DPREFIX=%basename_t.tmp --match-full-lines
158 # X86-SYMBOLS: Archive map
159 # X86-SYMBOLS-NEXT: _x86_64 in [[PREFIX]]-x86_64.obj
160 # X86-SYMBOLS-NEXT: _x86_64 in [[PREFIX]]-x86_64.bc
164 ## CPUTYPE: CPU_TYPE_X86_64
165 ## CPUSUBTYPE: CPU_SUBTYPE_X86_64_ALL
170 cpusubtype: 0x00000003
191 addr: 0x0000000000000000
198 reserved1: 0x00000000
199 reserved2: 0x00000000
200 reserved3: 0x00000000
201 content: 554889E531C0C745FC000000005DC3
222 ## CPUTYPE: CPU_TYPE_X86_64
223 ## CPUSUBTYPE: CPU_SUBTYPE_X86_64_H
228 cpusubtype: 0x00000008
249 addr: 0x0000000000000000
256 reserved1: 0x00000000
257 reserved2: 0x00000000
258 reserved3: 0x00000000
259 content: 554889E531C0C745FC000000005DC3