• Home
  • Raw
  • Download

Lines Matching +full:mach +full:- +full:o

1 //===- unittest/BinaryFormat/MachOTest.cpp - MachO support tests ----------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
35 ASSERT_EQ(Header->magic, MH_MAGIC); in TEST()
38 Valid32BitMachO + sizeof(mach_header) + Header->sizeofcmds; in TEST()
43 swapStruct(LC->load_command_data); in TEST()
44 ASSERT_EQ(LC->load_command_data.cmd, LC_SEGMENT); in TEST()
45 Current += LC->load_command_data.cmdsize; in TEST()
53 CHECK_CPUTYPE("x86_64-apple-darwin", MachO::CPU_TYPE_X86_64); in TEST()
54 CHECK_CPUTYPE("x86_64h-apple-darwin", MachO::CPU_TYPE_X86_64); in TEST()
55 CHECK_CPUTYPE("i386-apple-darwin", MachO::CPU_TYPE_X86); in TEST()
56 CHECK_CPUTYPE("armv7-apple-darwin", MachO::CPU_TYPE_ARM); in TEST()
57 CHECK_CPUTYPE("thumbv7-apple-darwin", MachO::CPU_TYPE_ARM); in TEST()
58 CHECK_CPUTYPE("arm64-apple-darwin", MachO::CPU_TYPE_ARM64); in TEST()
59 CHECK_CPUTYPE("arm64e-apple-darwin", MachO::CPU_TYPE_ARM64); in TEST()
60 CHECK_CPUTYPE("arm64_32-apple-darwin", MachO::CPU_TYPE_ARM64_32); in TEST()
63 // Not a mach-o. in TEST()
64 Expected<uint32_t> Type = MachO::getCPUType(Triple("x86_64-linux-unknown")); in TEST()
66 "Unsupported triple for mach-o cpu type: x86_64-linux-unknown"); in TEST()
69 // Not a valid mach-o architecture. in TEST()
70 Expected<uint32_t> Type = MachO::getCPUType(Triple("mips-apple-darwin")); in TEST()
72 "Unsupported triple for mach-o cpu type: mips-apple-darwin"); in TEST()
81 CHECK_CPUSUBTYPE("x86_64-apple-darwin", MachO::CPU_SUBTYPE_X86_64_ALL); in TEST()
82 CHECK_CPUSUBTYPE("x86_64h-apple-darwin", MachO::CPU_SUBTYPE_X86_64_H); in TEST()
83 CHECK_CPUSUBTYPE("i386-apple-darwin", MachO::CPU_SUBTYPE_I386_ALL); in TEST()
84 CHECK_CPUSUBTYPE("arm-apple-darwin", MachO::CPU_SUBTYPE_ARM_V7); // Default in TEST()
85 CHECK_CPUSUBTYPE("armv4t-apple-darwin", MachO::CPU_SUBTYPE_ARM_V4T); in TEST()
86 CHECK_CPUSUBTYPE("armv5t-apple-darwin", MachO::CPU_SUBTYPE_ARM_V5); in TEST()
87 CHECK_CPUSUBTYPE("armv5te-apple-darwin", MachO::CPU_SUBTYPE_ARM_V5); in TEST()
88 CHECK_CPUSUBTYPE("armv5tej-apple-darwin", MachO::CPU_SUBTYPE_ARM_V5); in TEST()
89 CHECK_CPUSUBTYPE("armv6-apple-darwin", MachO::CPU_SUBTYPE_ARM_V6); in TEST()
90 CHECK_CPUSUBTYPE("armv6k-apple-darwin", MachO::CPU_SUBTYPE_ARM_V6); in TEST()
91 CHECK_CPUSUBTYPE("armv7a-apple-darwin", MachO::CPU_SUBTYPE_ARM_V7); in TEST()
92 CHECK_CPUSUBTYPE("armv7s-apple-darwin", MachO::CPU_SUBTYPE_ARM_V7S); in TEST()
93 CHECK_CPUSUBTYPE("armv7k-apple-darwin", MachO::CPU_SUBTYPE_ARM_V7K); in TEST()
94 CHECK_CPUSUBTYPE("armv6m-apple-darwin", MachO::CPU_SUBTYPE_ARM_V6M); in TEST()
95 CHECK_CPUSUBTYPE("armv7m-apple-darwin", MachO::CPU_SUBTYPE_ARM_V7M); in TEST()
96 CHECK_CPUSUBTYPE("armv7em-apple-darwin", MachO::CPU_SUBTYPE_ARM_V7EM); in TEST()
97 CHECK_CPUSUBTYPE("thumbv7-apple-darwin", MachO::CPU_SUBTYPE_ARM_V7); in TEST()
98 CHECK_CPUSUBTYPE("thumbv6-apple-darwin", MachO::CPU_SUBTYPE_ARM_V6); in TEST()
99 CHECK_CPUSUBTYPE("arm64-apple-darwin", MachO::CPU_SUBTYPE_ARM64_ALL); in TEST()
100 CHECK_CPUSUBTYPE("arm64e-apple-darwin", MachO::CPU_SUBTYPE_ARM64E); in TEST()
101 CHECK_CPUSUBTYPE("arm64_32-apple-darwin", MachO::CPU_SUBTYPE_ARM64_32_V8); in TEST()
104 // Not a mach-o. in TEST()
106 MachO::getCPUSubType(Triple("x86_64-linux-unknown")); in TEST()
109 "Unsupported triple for mach-o cpu subtype: x86_64-linux-unknown"); in TEST()
112 // Not a valid mach-o architecture. in TEST()
113 Expected<uint32_t> Type = MachO::getCPUSubType(Triple("mips-apple-darwin")); in TEST()
115 "Unsupported triple for mach-o cpu subtype: mips-apple-darwin"); in TEST()