Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp

Issue 7730004: add llvm configure flags to enable/disable target OSes/Envs Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Support/Triple.cpp ('k') | lib/Target/TargetLibraryInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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"
OLDNEW
« no previous file with comments | « lib/Support/Triple.cpp ('k') | lib/Target/TargetLibraryInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698