LLVM
22.0.0git
lib
Target
ARM
MCTargetDesc
ARMAsmBackendDarwin.h
Go to the documentation of this file.
1
//===-- ARMAsmBackendDarwin.h ARM Asm Backend Darwin ----------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_LIB_TARGET_ARM_ARMASMBACKENDDARWIN_H
10
#define LLVM_LIB_TARGET_ARM_ARMASMBACKENDDARWIN_H
11
12
#include "
ARMAsmBackend.h
"
13
#include "
llvm/BinaryFormat/MachO.h
"
14
#include "
llvm/MC/MCContext.h
"
15
#include "
llvm/MC/MCObjectWriter.h
"
16
17
namespace
llvm
{
18
class
ARMAsmBackendDarwin
:
public
ARMAsmBackend
{
19
const
MCRegisterInfo
&MRI;
20
Triple
TT;
21
public
:
22
const
MachO::CPUSubTypeARM
Subtype
;
23
ARMAsmBackendDarwin
(
const
Target
&
T
,
const
MCSubtargetInfo
&STI,
24
const
MCRegisterInfo
&MRI)
25
:
ARMAsmBackend
(
T
,
llvm
::
endianness
::
little
), MRI(MRI),
26
TT(STI.getTargetTriple()),
27
Subtype
((
MachO
::CPUSubTypeARM)
cantFail
(
28
MachO
::
getCPUSubType
(STI.getTargetTriple()))) {}
29
30
std::unique_ptr<MCObjectTargetWriter>
31
createObjectTargetWriter
()
const override
{
32
return
createARMMachObjectWriter
(
33
/*Is64Bit=*/
false
,
cantFail
(
MachO::getCPUType
(TT)),
Subtype
);
34
}
35
36
uint64_t
generateCompactUnwindEncoding
(
const
MCDwarfFrameInfo
*FI,
37
const
MCContext
*Ctxt)
const override
;
38
};
39
}
// end namespace llvm
40
41
#endif
ARMAsmBackend.h
MachO.h
MCContext.h
MCObjectWriter.h
getCPUSubType
static unsigned getCPUSubType(const MachOObjectFile &O)
Definition
MachOObjectFile.cpp:136
T
#define T
Definition
Mips16ISelLowering.cpp:353
llvm::ARMAsmBackendDarwin::generateCompactUnwindEncoding
uint64_t generateCompactUnwindEncoding(const MCDwarfFrameInfo *FI, const MCContext *Ctxt) const override
Generate compact unwind encoding for the function based on the CFI instructions.
Definition
ARMAsmBackend.cpp:1171
llvm::ARMAsmBackendDarwin::createObjectTargetWriter
std::unique_ptr< MCObjectTargetWriter > createObjectTargetWriter() const override
Definition
ARMAsmBackendDarwin.h:31
llvm::ARMAsmBackendDarwin::Subtype
const MachO::CPUSubTypeARM Subtype
Definition
ARMAsmBackendDarwin.h:22
llvm::ARMAsmBackendDarwin::ARMAsmBackendDarwin
ARMAsmBackendDarwin(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI)
Definition
ARMAsmBackendDarwin.h:23
llvm::ARMAsmBackend::ARMAsmBackend
ARMAsmBackend(const Target &T, llvm::endianness Endian)
Definition
ARMAsmBackend.h:22
llvm::MCContext
Context object for machine code objects.
Definition
MCContext.h:83
llvm::MCRegisterInfo
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Definition
MCRegisterInfo.h:150
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition
MCSubtargetInfo.h:77
llvm::Target
Target - Wrapper for Target specific information.
Definition
TargetRegistry.h:146
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition
Triple.h:47
uint64_t
llvm::MachO
Definition
MachO.h:25
llvm::MachO::CPUSubTypeARM
CPUSubTypeARM
Definition
MachO.h:1626
llvm::MachO::getCPUType
LLVM_ABI Expected< uint32_t > getCPUType(const Triple &T)
Definition
MachO.cpp:77
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
llvm::createARMMachObjectWriter
std::unique_ptr< MCObjectTargetWriter > createARMMachObjectWriter(bool Is64Bit, uint32_t CPUType, uint32_t CPUSubtype)
Construct an ARM Mach-O object writer.
Definition
ARMMachObjectWriter.cpp:491
llvm::cantFail
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
Definition
Error.h:769
llvm::endianness
endianness
Definition
bit.h:71
llvm::endianness::little
@ little
Definition
bit.h:73
llvm::MCDwarfFrameInfo
Definition
MCDwarf.h:769
Generated on
for LLVM by
1.14.0