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

Side by Side Diff: lib/Target/ARM/ARMAsmPrinter.cpp

Issue 3551007: ARM MC .s EmitStartOfAsm proof-of-concept cleanup (Closed) Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: Created 10 years, 2 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/MC/MCELFStreamer.cpp ('k') | test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- ARMAsmPrinter.cpp - Print machine code to an ARM .s file ----------===// 1 //===-- ARMAsmPrinter.cpp - Print machine code to an ARM .s file ----------===//
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 contains a printer that converts from our internal representation 10 // This file contains a printer that converts from our internal representation
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 const MCSection *StaticInitSect = 1162 const MCSection *StaticInitSect =
1163 OutContext.getMachOSection("__TEXT", "__StaticInit", 1163 OutContext.getMachOSection("__TEXT", "__StaticInit",
1164 MCSectionMachO::S_REGULAR | 1164 MCSectionMachO::S_REGULAR |
1165 MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, 1165 MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
1166 SectionKind::getText()); 1166 SectionKind::getText());
1167 OutStreamer.SwitchSection(StaticInitSect); 1167 OutStreamer.SwitchSection(StaticInitSect);
1168 } 1168 }
1169 } 1169 }
1170 1170
1171 // Use unified assembler syntax. 1171 // Use unified assembler syntax.
1172 OutStreamer.EmitRawText(StringRef("\t.syntax unified")); 1172 OutStreamer.EmitAssemblerFlag(MCAF_SyntaxUnified);
1173 1173
1174 // Emit ARM Build Attributes 1174 // Emit ARM Build Attributes
1175 if (Subtarget->isTargetELF()) { 1175 if (Subtarget->isTargetELF()) {
1176 // CPU Type 1176 // CPU Type
1177 std::string CPUString = Subtarget->getCPUString(); 1177 std::string CPUString = Subtarget->getCPUString();
1178 if (CPUString != "generic") 1178 if (CPUString != "generic")
1179 OutStreamer.EmitRawText("\t.cpu " + Twine(CPUString)); 1179 OutStreamer.EmitRawText("\t.cpu " + Twine(CPUString));
1180 1180
1181 // FIXME: Emit FPU type 1181 // FIXME: Emit FPU type
1182 if (Subtarget->hasVFP2()) 1182 if (Subtarget->hasVFP2())
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 1977
1978 // Force static initialization. 1978 // Force static initialization.
1979 extern "C" void LLVMInitializeARMAsmPrinter() { 1979 extern "C" void LLVMInitializeARMAsmPrinter() {
1980 RegisterAsmPrinter<ARMAsmPrinter> X(TheARMTarget); 1980 RegisterAsmPrinter<ARMAsmPrinter> X(TheARMTarget);
1981 RegisterAsmPrinter<ARMAsmPrinter> Y(TheThumbTarget); 1981 RegisterAsmPrinter<ARMAsmPrinter> Y(TheThumbTarget);
1982 1982
1983 TargetRegistry::RegisterMCInstPrinter(TheARMTarget, createARMMCInstPrinter); 1983 TargetRegistry::RegisterMCInstPrinter(TheARMTarget, createARMMCInstPrinter);
1984 TargetRegistry::RegisterMCInstPrinter(TheThumbTarget, createARMMCInstPrinter); 1984 TargetRegistry::RegisterMCInstPrinter(TheThumbTarget, createARMMCInstPrinter);
1985 } 1985 }
1986 1986
OLDNEW
« no previous file with comments | « lib/MC/MCELFStreamer.cpp ('k') | test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698