blob: 995dd0fe08ee97673f4e120dcf64abdfa989df8f [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
13#include "llvm/Support/MachO.h"
14
15using namespace llvm;
16
17namespace {
18class ARMAsmBackendDarwin : public ARMAsmBackend {
Tim Northoverf8e47e42015-10-28 22:56:36 +000019 const MCRegisterInfo &MRI;
Joe Abbey8e72eb72014-09-16 09:18:23 +000020public:
21 const MachO::CPUSubTypeARM Subtype;
Daniel Sanders50f17232015-09-15 16:17:27 +000022 ARMAsmBackendDarwin(const Target &T, const Triple &TT,
Tim Northoverf8e47e42015-10-28 22:56:36 +000023 const MCRegisterInfo &MRI, MachO::CPUSubTypeARM st)
24 : ARMAsmBackend(T, TT, /* IsLittleEndian */ true), MRI(MRI), Subtype(st) {
Joe Abbey8e72eb72014-09-16 09:18:23 +000025 HasDataInCodeSupport = true;
26 }
27
Rafael Espindola5560a4c2015-04-14 22:14:34 +000028 MCObjectWriter *createObjectWriter(raw_pwrite_stream &OS) const override {
Joe Abbey8e72eb72014-09-16 09:18:23 +000029 return createARMMachObjectWriter(OS, /*Is64Bit=*/false, MachO::CPU_TYPE_ARM,
30 Subtype);
31 }
Tim Northoverf8e47e42015-10-28 22:56:36 +000032
33 uint32_t generateCompactUnwindEncoding(
34 ArrayRef<MCCFIInstruction> Instrs) const override;
Joe Abbey8e72eb72014-09-16 09:18:23 +000035};
Alexander Kornienkof00654e2015-06-23 09:49:53 +000036}
Joe Abbey8e72eb72014-09-16 09:18:23 +000037
38#endif