2014-09-16 17:18:23 +08:00
|
|
|
//===-- ARMAsmBackendDarwin.h ARM Asm Backend Darwin ----------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_ARM_ARMASMBACKENDDARWIN_H
|
|
|
|
#define LLVM_LIB_TARGET_ARM_ARMASMBACKENDDARWIN_H
|
|
|
|
|
2016-01-28 03:29:42 +08:00
|
|
|
#include "ARMAsmBackend.h"
|
2017-06-07 11:48:56 +08:00
|
|
|
#include "llvm/BinaryFormat/MachO.h"
|
2014-09-16 17:18:23 +08:00
|
|
|
|
2016-01-28 03:29:42 +08:00
|
|
|
namespace llvm {
|
2014-09-16 17:18:23 +08:00
|
|
|
class ARMAsmBackendDarwin : public ARMAsmBackend {
|
2015-10-29 06:56:36 +08:00
|
|
|
const MCRegisterInfo &MRI;
|
2014-09-16 17:18:23 +08:00
|
|
|
public:
|
|
|
|
const MachO::CPUSubTypeARM Subtype;
|
2015-09-16 00:17:27 +08:00
|
|
|
ARMAsmBackendDarwin(const Target &T, const Triple &TT,
|
2015-10-29 06:56:36 +08:00
|
|
|
const MCRegisterInfo &MRI, MachO::CPUSubTypeARM st)
|
|
|
|
: ARMAsmBackend(T, TT, /* IsLittleEndian */ true), MRI(MRI), Subtype(st) {
|
2014-09-16 17:18:23 +08:00
|
|
|
}
|
|
|
|
|
2017-10-11 00:28:07 +08:00
|
|
|
std::unique_ptr<MCObjectWriter>
|
|
|
|
createObjectWriter(raw_pwrite_stream &OS) const override {
|
2014-09-16 17:18:23 +08:00
|
|
|
return createARMMachObjectWriter(OS, /*Is64Bit=*/false, MachO::CPU_TYPE_ARM,
|
|
|
|
Subtype);
|
|
|
|
}
|
2015-10-29 06:56:36 +08:00
|
|
|
|
|
|
|
uint32_t generateCompactUnwindEncoding(
|
|
|
|
ArrayRef<MCCFIInstruction> Instrs) const override;
|
2014-09-16 17:18:23 +08:00
|
|
|
};
|
2016-01-28 03:29:42 +08:00
|
|
|
} // end namespace llvm
|
2014-09-16 17:18:23 +08:00
|
|
|
|
|
|
|
#endif
|