1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/include/llvm/MC
Oliver Stannard 76132aaa0b [ARM] Add hardware build attributes in assembler
In the assembler, we should emit build attributes based on the target
selected with command-line options. This matches the GNU assembler's
behaviour. We only do this for build attributes which describe the
hardware that is expected to be available, not the ones that describe
ABI compatibility.

This is done by moving some of the attribute emission code to
ARMTargetStreamer, so that it can be shared between the assembly and
code-generation code paths. Since the assembler only creates a
MCSubtargetInfo, not an ARMSubtarget, the code had to be changed to
check raw features, and not use the convenience functions in
ARMSubtarget.

If different attributes are later specified using the .eabi_attribute
directive, then they will take precedence, as happens when the same
.eabi_attribute is specified twice.

This must be enabled by an option, because we don't want to do this when
parsing inline assembly. The attributes would match the ones emitted at
the start of the file, so wouldn't actually change the emitted object
file, but the extra directives would be added to every inline assembly
block when emitting assembly, which we'd like to avoid.

The majority of the changes in the build-attributes.ll test are just
re-ordering the directives, because the hardware attributes are now
emitted before the ABI ones. However, I did fix one bug which I spotted:
Tag_CPU_arch_profile was not being emitted for v6M.

Differential revision: https://reviews.llvm.org/D31812

llvm-svn: 300547
2017-04-18 12:52:35 +00:00
..
MCDisassembler [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCParser [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-10 01:33:54 +00:00
ConstantPools.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-07 23:02:00 +00:00
LaneBitmask.h Implement LaneBitmask::any(), use it to replace !none(), NFCI 2016-12-16 19:11:56 +00:00
MachineLocation.h [MC] Fix MachineLocation constructor broken in r294685 (NFC). 2017-03-01 22:28:23 +00:00
MCAsmBackend.h Add MCContext argument to MCAsmBackend::applyFixup for error reporting 2017-04-05 10:16:14 +00:00
MCAsmInfo.h Distinguish between code pointer size and DataLayout::getPointerSize() in DWARF info generation 2017-04-17 17:41:25 +00:00
MCAsmInfoCOFF.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCAsmInfoDarwin.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCAsmInfoELF.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCAsmInfoWasm.h [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
MCAsmLayout.h Merge MCSymbol and MCSymbolData. 2015-05-29 20:31:23 +00:00
MCAssembler.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-07 23:02:00 +00:00
MCCodeEmitter.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCCodeView.h [codeview] Add new directives to record inlined call site line info 2016-09-07 16:15:31 +00:00
MCContext.h Fix asm printing of associated sections. 2017-03-14 19:28:51 +00:00
MCDirectives.h [MachO] Add MachO alt-entry directive support. 2016-03-15 01:43:05 +00:00
MCDwarf.h Add initializer that was missed in r295009. 2017-02-14 07:10:03 +00:00
MCELFObjectWriter.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-07 23:02:00 +00:00
MCELFStreamer.h Reland r298901 with modifications (reverted in r298932) 2017-04-03 21:50:04 +00:00
MCExpr.h [Assembler] Add location info to unary expressions. 2017-03-10 13:08:20 +00:00
MCFixedLenDisassembler.h [TableGen] Improve decoding options for non-orthogonal instructions 2015-07-15 08:04:27 +00:00
MCFixup.h [mips][ias] Support .dtprel[d]word and .tprel[d]word directives 2016-08-22 16:18:42 +00:00
MCFixupKindInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MCFragment.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-07 23:02:00 +00:00
MCInst.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCInstBuilder.h MC: Modernize MCOperand API naming. NFC. 2015-05-13 18:37:00 +00:00
MCInstPrinter.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCInstrAnalysis.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCInstrDesc.h Revert r283690, "MC: Remove unused entities." 2016-10-10 22:49:37 +00:00
MCInstrInfo.h Use StringRef instead of raw pointers in MCAsmInfo/MCInstrInfo APIs (NFC) 2016-10-01 06:46:33 +00:00
MCInstrItineraries.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCLabel.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCLinkerOptimizationHint.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCMachObjectWriter.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-07 23:02:00 +00:00
MCObjectFileInfo.h [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
MCObjectStreamer.h This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs. 2017-04-14 07:44:23 +00:00
MCObjectWriter.h MC: Remove unused virtual function MCObjectWriter::isWeak. NFC. 2017-04-08 23:35:49 +00:00
MCRegisterInfo.h Move spill size and alignment info from MC to TargetRegisterInfo 2017-03-24 21:01:16 +00:00
MCSchedule.h [MCSchedule] Remove comments about MinLatency. NFC 2016-03-14 00:36:19 +00:00
MCSection.h [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
MCSectionCOFF.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-10 01:33:54 +00:00
MCSectionELF.h Fix asm printing of associated sections. 2017-03-14 19:28:51 +00:00
MCSectionMachO.h Only print architecture dependent flags for that architecture. 2017-01-30 15:38:43 +00:00
MCSectionWasm.h [WebAssembly] Basic support for Wasm object file encoding. 2017-02-24 23:18:00 +00:00
MCStreamer.h [ARM] Add hardware build attributes in assembler 2017-04-18 12:52:35 +00:00
MCSubtargetInfo.h [ARM] Add hardware build attributes in assembler 2017-04-18 12:52:35 +00:00
MCSymbol.h [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
MCSymbolCOFF.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-10 01:33:54 +00:00
MCSymbolELF.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MCSymbolMachO.h Add missing include. Should fix modules builds. 2016-06-23 07:30:12 +00:00
MCSymbolWasm.h [WebAssembly] Use LEB encoding for value types 2017-03-14 20:23:22 +00:00
MCTargetOptions.h Remove stale and unused (MC)TargetOptions comparators. 2017-03-24 12:50:45 +00:00
MCTargetOptionsCommandFlags.h Summary: Currently there is no way to disable deprecated warning from asm like this 2016-12-05 23:55:13 +00:00
MCValue.h ELF can handle some relocations of the form -sym + constant. 2015-11-02 19:13:59 +00:00
MCWasmObjectWriter.h [WebAssembly] Basic support for Wasm object file encoding. 2017-02-24 23:18:00 +00:00
MCWasmStreamer.h MC: De-duplicate the object streamer implementations of EmitFileDirective into MCObjectStreamer. NFCI. 2017-03-03 21:22:06 +00:00
MCWin64EH.h Revert r283690, "MC: Remove unused entities." 2016-10-10 22:49:37 +00:00
MCWinCOFFObjectWriter.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-07 23:02:00 +00:00
MCWinCOFFStreamer.h MC: De-duplicate the object streamer implementations of EmitFileDirective into MCObjectStreamer. NFCI. 2017-03-03 21:22:06 +00:00
MCWinEH.h Revert r283690, "MC: Remove unused entities." 2016-10-10 22:49:37 +00:00
SectionKind.h [ARM] Implement execute-only support in CodeGen 2016-12-15 07:59:08 +00:00
StringTableBuilder.h [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
SubtargetFeature.h SubtargetFeature: Cleanup; NFC 2017-02-21 01:27:29 +00:00