OLD | NEW |
1 //===-- ARMAsmBackend.cpp - ARM Assembler Backend -------------------------===// | 1 //===-- ARMAsmBackend.cpp - ARM Assembler Backend -------------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 | 9 |
10 #include "llvm/Target/TargetAsmBackend.h" | 10 #include "llvm/Target/TargetAsmBackend.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // FIXME: Thumb targets, different move constant targets.. | 47 // FIXME: Thumb targets, different move constant targets.. |
48 return false; | 48 return false; |
49 } | 49 } |
50 | 50 |
51 void ARMAsmBackend::RelaxInstruction(const MCInst &Inst, MCInst &Res) const { | 51 void ARMAsmBackend::RelaxInstruction(const MCInst &Inst, MCInst &Res) const { |
52 assert(0 && "ARMAsmBackend::RelaxInstruction() unimplemented"); | 52 assert(0 && "ARMAsmBackend::RelaxInstruction() unimplemented"); |
53 return; | 53 return; |
54 } | 54 } |
55 | 55 |
56 bool ARMAsmBackend::WriteNopData(uint64_t Count, MCObjectWriter *OW) const { | 56 bool ARMAsmBackend::WriteNopData(uint64_t Count, MCObjectWriter *OW) const { |
57 assert(0 && "ARMAsmBackend::WriteNopData() unimplemented"); | 57 // assert(0 && "ARMAsmBackend::WriteNopData() unimplemented"); |
58 if ((Count % 4) != 0) { | 58 if ((Count % 4) != 0) { |
59 // Fixme: % 2 for Thumb? | 59 // Fixme: % 2 for Thumb? |
60 return false; | 60 return false; |
61 } | 61 } |
62 return false; | 62 return true; |
63 } | 63 } |
64 } // end anonymous namespace | 64 } // end anonymous namespace |
65 | 65 |
66 namespace { | 66 namespace { |
67 // FIXME: This should be in a separate file. | 67 // FIXME: This should be in a separate file. |
68 // ELF is an ELF of course... | 68 // ELF is an ELF of course... |
69 class ELFARMAsmBackend : public ARMAsmBackend { | 69 class ELFARMAsmBackend : public ARMAsmBackend { |
70 MCELFObjectFormat Format; | 70 MCELFObjectFormat Format; |
71 | 71 |
72 public: | 72 public: |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 case Triple::Darwin: | 148 case Triple::Darwin: |
149 return new DarwinARMAsmBackend(T); | 149 return new DarwinARMAsmBackend(T); |
150 case Triple::MinGW32: | 150 case Triple::MinGW32: |
151 case Triple::Cygwin: | 151 case Triple::Cygwin: |
152 case Triple::Win32: | 152 case Triple::Win32: |
153 assert(0 && "Windows not supported on ARM"); | 153 assert(0 && "Windows not supported on ARM"); |
154 default: | 154 default: |
155 return new ELFARMAsmBackend(T, Triple(TT).getOS()); | 155 return new ELFARMAsmBackend(T, Triple(TT).getOS()); |
156 } | 156 } |
157 } | 157 } |
OLD | NEW |