Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 1 | //===-- 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 Kramer | b32a504 | 2016-01-27 19:29:42 +0000 | [diff] [blame^] | 13 | #include "ARMAsmBackend.h" |
Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 14 | #include "llvm/Support/MachO.h" |
| 15 | |
Benjamin Kramer | b32a504 | 2016-01-27 19:29:42 +0000 | [diff] [blame^] | 16 | namespace llvm { |
Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 17 | class ARMAsmBackendDarwin : public ARMAsmBackend { |
Tim Northover | f8e47e4 | 2015-10-28 22:56:36 +0000 | [diff] [blame] | 18 | const MCRegisterInfo &MRI; |
Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 19 | public: |
| 20 | const MachO::CPUSubTypeARM Subtype; |
Daniel Sanders | 50f1723 | 2015-09-15 16:17:27 +0000 | [diff] [blame] | 21 | ARMAsmBackendDarwin(const Target &T, const Triple &TT, |
Tim Northover | f8e47e4 | 2015-10-28 22:56:36 +0000 | [diff] [blame] | 22 | const MCRegisterInfo &MRI, MachO::CPUSubTypeARM st) |
| 23 | : ARMAsmBackend(T, TT, /* IsLittleEndian */ true), MRI(MRI), Subtype(st) { |
Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 24 | HasDataInCodeSupport = true; |
| 25 | } |
| 26 | |
Rafael Espindola | 5560a4c | 2015-04-14 22:14:34 +0000 | [diff] [blame] | 27 | MCObjectWriter *createObjectWriter(raw_pwrite_stream &OS) const override { |
Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 28 | return createARMMachObjectWriter(OS, /*Is64Bit=*/false, MachO::CPU_TYPE_ARM, |
| 29 | Subtype); |
| 30 | } |
Tim Northover | f8e47e4 | 2015-10-28 22:56:36 +0000 | [diff] [blame] | 31 | |
| 32 | uint32_t generateCompactUnwindEncoding( |
| 33 | ArrayRef<MCCFIInstruction> Instrs) const override; |
Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 34 | }; |
Benjamin Kramer | b32a504 | 2016-01-27 19:29:42 +0000 | [diff] [blame^] | 35 | } // end namespace llvm |
Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 36 | |
| 37 | #endif |