blob: 09dc0173ade6537d22c7995095c322ed286999df [file] [log] [blame]
Joe Abbey8e72eb72014-09-16 09:18:23 +00001//===-- ARMAsmBackendDarwin.h ARM Asm Backend Darwin ----------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LLVM_LIB_TARGET_ARM_ARMASMBACKENDDARWIN_H
11#define LLVM_LIB_TARGET_ARM_ARMASMBACKENDDARWIN_H
12
Benjamin Kramerb32a5042016-01-27 19:29:42 +000013#include "ARMAsmBackend.h"
Joe Abbey8e72eb72014-09-16 09:18:23 +000014#include "llvm/Support/MachO.h"
15
Benjamin Kramerb32a5042016-01-27 19:29:42 +000016namespace llvm {
Joe Abbey8e72eb72014-09-16 09:18:23 +000017class ARMAsmBackendDarwin : public ARMAsmBackend {
Tim Northoverf8e47e42015-10-28 22:56:36 +000018 const MCRegisterInfo &MRI;
Joe Abbey8e72eb72014-09-16 09:18:23 +000019public:
20 const MachO::CPUSubTypeARM Subtype;
Daniel Sanders50f17232015-09-15 16:17:27 +000021 ARMAsmBackendDarwin(const Target &T, const Triple &TT,
Tim Northoverf8e47e42015-10-28 22:56:36 +000022 const MCRegisterInfo &MRI, MachO::CPUSubTypeARM st)
23 : ARMAsmBackend(T, TT, /* IsLittleEndian */ true), MRI(MRI), Subtype(st) {
Joe Abbey8e72eb72014-09-16 09:18:23 +000024 }
25
Rafael Espindola5560a4c2015-04-14 22:14:34 +000026 MCObjectWriter *createObjectWriter(raw_pwrite_stream &OS) const override {
Joe Abbey8e72eb72014-09-16 09:18:23 +000027 return createARMMachObjectWriter(OS, /*Is64Bit=*/false, MachO::CPU_TYPE_ARM,
28 Subtype);
29 }
Tim Northoverf8e47e42015-10-28 22:56:36 +000030
31 uint32_t generateCompactUnwindEncoding(
32 ArrayRef<MCCFIInstruction> Instrs) const override;
Joe Abbey8e72eb72014-09-16 09:18:23 +000033};
Benjamin Kramerb32a5042016-01-27 19:29:42 +000034} // end namespace llvm
Joe Abbey8e72eb72014-09-16 09:18:23 +000035
36#endif