LLVM: lib/BinaryFormat/MachO.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

12

13using namespace llvm;

14

17 if (T.isArch32Bit())

19

21 if (T.getArchName() == "x86_64h")

24}

25

27 assert(T.isARM() || T.isThumb());

30 switch (AK) {

31 default:

33 case ARM::ArchKind::ARMV4T:

35 case ARM::ArchKind::ARMV5T:

36 case ARM::ArchKind::ARMV5TE:

37 case ARM::ArchKind::ARMV5TEJ:

39 case ARM::ArchKind::ARMV6:

40 case ARM::ArchKind::ARMV6K:

42 case ARM::ArchKind::ARMV7A:

44 case ARM::ArchKind::ARMV7S:

46 case ARM::ArchKind::ARMV7K:

48 case ARM::ArchKind::ARMV6M:

50 case ARM::ArchKind::ARMV7M:

52 case ARM::ArchKind::ARMV7EM:

54 }

55}

56

59 if (T.isArch32Bit())

61 if (T.isArm64e())

63

65}

66

69}

70

73 "Unsupported triple for mach-o cpu %s: %s", Str,

74 T.str().c_str());

75}

76

78 if (T.isOSBinFormatMachO())

80 if (T.isX86() && T.isArch32Bit())

82 if (T.isX86() && T.isArch64Bit())

84 if (T.isARM() || T.isThumb())

86 if (T.isAArch64())

93}

94

96 if (T.isOSBinFormatMachO())

98 if (T.isX86())

100 if (T.isARM() || T.isThumb())

107}

108

110 unsigned PtrAuthABIVersion,

111 bool PtrAuthKernelABIVersion) {

113 if (!Result)

114 return Result.takeError();

117 std::errc::invalid_argument,

118 "ptrauth ABI version is only supported on arm64e.");

119 if (PtrAuthABIVersion > 0xF)

121 std::errc::invalid_argument,

122 "The ptrauth ABI version needs to fit within 4 bits.");

124 PtrAuthKernelABIVersion);

125}

static Error unsupported(const char *Str, const Triple &T)

static MachO::CPUSubTypeX86 getX86SubType(const Triple &T)

static MachO::CPUSubTypeARM64 getARM64SubType(const Triple &T)

static MachO::CPUSubTypePowerPC getPowerPCSubType(const Triple &T)

static MachO::CPUSubTypeARM getARMSubType(const Triple &T)

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

Lightweight error class with error context and mandatory checking.

Tagged union holding either a T or a Error.

StringRef - Represent a constant reference to a string, i.e.

Triple - Helper class for working with autoconf configuration names.

ArchKind parseArch(StringRef Arch)

Expected< uint32_t > getCPUSubType(const Triple &T)

@ CPU_SUBTYPE_POWERPC_ALL

@ CPU_SUBTYPE_ARM64_32_V8

uint32_t CPU_SUBTYPE_ARM64E_WITH_PTRAUTH_VERSION(unsigned PtrAuthABIVersion, bool PtrAuthKernelABIVersion)

Expected< uint32_t > getCPUType(const Triple &T)

This is an optimization pass for GlobalISel generic memory operations.

Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)

Create formatted StringError object.