| OLD | NEW |
| 1 //===-- ARM/ARMMCCodeEmitter.cpp - Convert ARM code to machine code -------===// | 1 //===-- ARM/ARMMCCodeEmitter.cpp - Convert ARM code to machine code -------===// |
| 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 // This file implements the ARMMCCodeEmitter class. | 10 // This file implements the ARMMCCodeEmitter class. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 bool isThumb() const { | 50 bool isThumb() const { |
| 51 // FIXME: Can tablegen auto-generate this? | 51 // FIXME: Can tablegen auto-generate this? |
| 52 return (STI.getFeatureBits() & ARM::ModeThumb) != 0; | 52 return (STI.getFeatureBits() & ARM::ModeThumb) != 0; |
| 53 } | 53 } |
| 54 bool isThumb2() const { | 54 bool isThumb2() const { |
| 55 return isThumb() && (STI.getFeatureBits() & ARM::FeatureThumb2) != 0; | 55 return isThumb() && (STI.getFeatureBits() & ARM::FeatureThumb2) != 0; |
| 56 } | 56 } |
| 57 bool isTargetDarwin() const { | 57 bool isTargetDarwin() const { |
| 58 Triple TT(STI.getTargetTriple()); | 58 Triple TT(STI.getTargetTriple()); |
| 59 Triple::OSType OS = TT.getOS(); | 59 return TT.isOSDarwin(); |
| 60 return OS == Triple::Darwin || OS == Triple::MacOSX || OS == Triple::IOS; | |
| 61 } | 60 } |
| 62 | 61 |
| 63 unsigned getMachineSoImmOpValue(unsigned SoImm) const; | 62 unsigned getMachineSoImmOpValue(unsigned SoImm) const; |
| 64 | 63 |
| 65 // getBinaryCodeForInstr - TableGen'erated function for getting the | 64 // getBinaryCodeForInstr - TableGen'erated function for getting the |
| 66 // binary encoding for an instruction. | 65 // binary encoding for an instruction. |
| 67 unsigned getBinaryCodeForInstr(const MCInst &MI, | 66 unsigned getBinaryCodeForInstr(const MCInst &MI, |
| 68 SmallVectorImpl<MCFixup> &Fixups) const; | 67 SmallVectorImpl<MCFixup> &Fixups) const; |
| 69 | 68 |
| 70 /// getMachineOpValue - Return binary encoding of operand. If the machine | 69 /// getMachineOpValue - Return binary encoding of operand. If the machine |
| (...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 // first. | 1321 // first. |
| 1323 if (isThumb() && Size == 4) { | 1322 if (isThumb() && Size == 4) { |
| 1324 EmitConstant(Binary >> 16, 2, OS); | 1323 EmitConstant(Binary >> 16, 2, OS); |
| 1325 EmitConstant(Binary & 0xffff, 2, OS); | 1324 EmitConstant(Binary & 0xffff, 2, OS); |
| 1326 } else | 1325 } else |
| 1327 EmitConstant(Binary, Size, OS); | 1326 EmitConstant(Binary, Size, OS); |
| 1328 ++MCNumEmitted; // Keep track of the # of mi's emitted. | 1327 ++MCNumEmitted; // Keep track of the # of mi's emitted. |
| 1329 } | 1328 } |
| 1330 | 1329 |
| 1331 #include "ARMGenMCCodeEmitter.inc" | 1330 #include "ARMGenMCCodeEmitter.inc" |
| OLD | NEW |