LLVM 20.0.0git
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"
14#include "llvm/MC/MCContext.h"
16
17namespace llvm {
19 const MCRegisterInfo &MRI;
20 Triple TT;
21public:
24 const MCRegisterInfo &MRI)
25 : ARMAsmBackend(T, STI.getTargetTriple().isThumb(),
27 MRI(MRI), TT(STI.getTargetTriple()),
28 Subtype((MachO::CPUSubTypeARM)cantFail(
29 MachO::getCPUSubType(STI.getTargetTriple()))) {}
30
31 std::unique_ptr<MCObjectTargetWriter>
32 createObjectTargetWriter() const override {
34 /*Is64Bit=*/false, cantFail(MachO::getCPUType(TT)), Subtype);
35 }
36
38 const MCContext *Ctxt) const override;
39};
40} // end namespace llvm
41
42#endif
unsigned const MachineRegisterInfo * MRI
static unsigned getCPUSubType(const MachOObjectFile &O)
uint64_t generateCompactUnwindEncoding(const MCDwarfFrameInfo *FI, const MCContext *Ctxt) const override
Generate compact unwind encoding for the function based on the CFI instructions.
std::unique_ptr< MCObjectTargetWriter > createObjectTargetWriter() const override
const MachO::CPUSubTypeARM Subtype
ARMAsmBackendDarwin(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI)
bool isThumb() const
Definition: ARMAsmBackend.h:72
Context object for machine code objects.
Definition: MCContext.h:83
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Generic base class for all target subtargets.
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
Expected< uint32_t > getCPUType(const Triple &T)
Definition: MachO.cpp:77
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
std::unique_ptr< MCObjectTargetWriter > createARMMachObjectWriter(bool Is64Bit, uint32_t CPUType, uint32_t CPUSubtype)
Construct an ARM Mach-O object writer.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
Definition: Error.h:756
endianness
Definition: bit.h:70