OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |