2014-09-16 17:18:23 +08:00
|
|
|
//===-- ARMAsmBackendDarwin.h ARM Asm Backend Darwin ----------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2014-09-16 17:18:23 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#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"
|
2017-10-28 06:12:46 +08:00
|
|
|
#include "llvm/MC/MCObjectWriter.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;
|
2018-01-03 21:46:21 +08:00
|
|
|
ARMAsmBackendDarwin(const Target &T, const MCSubtargetInfo &STI,
|
2015-10-29 06:56:36 +08:00
|
|
|
const MCRegisterInfo &MRI, MachO::CPUSubTypeARM st)
|
2018-05-22 01:57:19 +08:00
|
|
|
: ARMAsmBackend(T, STI, support::little), MRI(MRI), Subtype(st) {}
|
2014-09-16 17:18:23 +08:00
|
|
|
|
2018-05-22 03:20:29 +08:00
|
|
|
std::unique_ptr<MCObjectTargetWriter>
|
|
|
|
createObjectTargetWriter() const override {
|
|
|
|
return createARMMachObjectWriter(/*Is64Bit=*/false, MachO::CPU_TYPE_ARM,
|
2014-09-16 17:18:23 +08:00
|
|
|
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
|