1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib/MC
Philip Reames 8de39d5e37 [BranchAlign] Compiler support for suppressing branch align
As discussed heavily in the original review (D70157), there's a need for the compiler to be able to selective suppress padding (either nop or prefix) to respect assumptions about the meaning of labels and instructions in generated code.

Rather than wait for syntax to be finalized - which appears to be a very slow process - this patch focuses on the compiler use case and *only* worries about the integrated assembler. To my knowledge, this covers all cases mentioned to date for clang/JIT support.

For testing purposes, I wired it up so that if the integrated assembler was using autopadding for branch alignment (e.g. enabled at command line) then the textual assembly output would contain a comment for each location where padding was enabled or disabled. This seemed like the least painful choice overall.

Note that the result of this patch effective disables the jcc errata mitigation for many constructs (statepoints, implicit null checks, xray, etc...) which is non ideal. It is at least *correct* and should allow us to enable the mitigation for the compiler. Once that's done, and a few other items are worked through, we probably want to come back to this an explore a bundling based approach instead so that we can pad instructions while keeping labels in the right place.

Differential Revision: https://reviews.llvm.org/D72303
2020-01-08 10:03:30 -08:00
..
MCDisassembler [MC] Add parameter Address to MCInstPrinter::printInst 2020-01-06 20:42:22 -08:00
MCParser [NFC] Fix trivial typos in comments 2020-01-06 10:50:26 +00:00
CMakeLists.txt [MC] Delete MCCodePadder 2019-12-09 19:21:31 -08:00
ConstantPools.cpp
ELFObjectWriter.cpp [MC] Emit unused undefined symbol even if its binding is not set 2019-11-08 14:47:48 -08:00
LLVMBuild.txt
MachObjectWriter.cpp [Alignment][NFC] Remove unneeded llvm:: scoping on Align types 2019-09-27 12:54:21 +00:00
MCAsmBackend.cpp [MC] Delete MCCodePadder 2019-12-09 19:21:31 -08:00
MCAsmInfo.cpp [XCOFF][AIX] Differentiate usage of label symbol and csect symbol 2019-11-08 09:30:10 -05:00
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp [MC] Delete unused MCAsmInfoELF::UsesNonexecutableStackSection after EM_WEBASSEMBLY was removed in D48744 2019-12-15 15:43:30 -08:00
MCAsmInfoWasm.cpp
MCAsmInfoXCOFF.cpp [XCOFF][AIX] Differentiate usage of label symbol and csect symbol 2019-11-08 09:30:10 -05:00
MCAsmMacro.cpp
MCAsmStreamer.cpp [BranchAlign] Compiler support for suppressing branch align 2020-01-08 10:03:30 -08:00
MCAssembler.cpp [MC] writeFragment - assert MCFragment::FT_Fill length is legal. 2020-01-08 17:19:11 +00:00
MCCodeEmitter.cpp
MCCodeView.cpp
MCContext.cpp [XCOFF][AIX] Differentiate usage of label symbol and csect symbol 2019-11-08 09:30:10 -05:00
MCDwarf.cpp [MC] Produce proper section relative relocations for COFF in .debug_frame 2019-11-27 10:44:42 +02:00
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp [MC] Delete redundant alignment update from MCELFStreamer::EmitCommonSymbol. NFC 2019-12-16 23:08:32 -08:00
MCExpr.cpp [NFC] Fix trivial typos in comments 2020-01-06 10:50:26 +00:00
MCFragment.cpp [MC] Reorder MCFragment members to decrease padding 2020-01-05 19:09:40 -08:00
MCInst.cpp
MCInstPrinter.cpp [MC] Rewrite tablegen for printInstrAlias to comiple faster, NFC 2019-12-06 15:00:18 -08:00
MCInstrAnalysis.cpp Revert "Forward declare Optional<T> in STLExtras.h" 2019-11-13 16:36:21 -08:00
MCInstrDesc.cpp
MCLabel.cpp
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp [AIX]Emit function descriptor csect in assembly 2019-09-26 19:38:32 +00:00
MCNullStreamer.cpp
MCObjectFileInfo.cpp [NFC] Use isX86() instead of getArch() 2020-01-07 17:35:44 +08:00
MCObjectStreamer.cpp [BranchAlign] Compiler support for suppressing branch align 2020-01-08 10:03:30 -08:00
MCObjectWriter.cpp
MCRegisterInfo.cpp MCRegisterInfo: Merge getLLVMRegNum and getLLVMRegNumFromEH 2019-09-24 09:31:02 +00:00
MCSchedule.cpp
MCSection.cpp [MC][ARM] Delete MCSection::HasData and move SHF_ARM_PURECODE logic to ARMELFObjectWriter::addTargetSectionFlags 2020-01-05 14:20:34 -08:00
MCSectionCOFF.cpp
MCSectionELF.cpp
MCSectionMachO.cpp
MCSectionWasm.cpp
MCSectionXCOFF.cpp [AIX] Emit TOC entries for ASM printing 2019-11-27 17:20:55 -05:00
MCStreamer.cpp [MC] Add parameter Address to MCInstPrinter::printInst 2020-01-06 20:42:22 -08:00
MCSubtargetInfo.cpp [System Model] [TTI] Update cache and prefetch TTI interfaces 2019-10-09 19:51:48 +00:00
MCSymbol.cpp
MCSymbolELF.cpp [MC] Delete STT_SECTION special cases from MCSymbolELF::setType and setBinding 2019-12-15 20:39:25 -08:00
MCTargetOptions.cpp [MC][TargetMachine] Delete MCTargetOptions::MCPIECopyRelocations 2020-01-01 00:50:18 -08:00
MCValue.cpp [MC] Ignore VK_WEAKREF in MCValue::getAccessVariant 2019-12-15 16:05:46 -08:00
MCWasmObjectTargetWriter.cpp
MCWasmStreamer.cpp
MCWin64EH.cpp
MCWinCOFFStreamer.cpp [Alignment][NFC] Remove unneeded llvm:: scoping on Align types 2019-09-27 12:54:21 +00:00
MCWinEH.cpp
MCXCOFFObjectTargetWriter.cpp
MCXCOFFStreamer.cpp [XCOFF][AIX] Emit TOC entries for object file generation 2019-12-04 16:44:44 +00:00
StringTableBuilder.cpp
SubtargetFeature.cpp
WasmObjectWriter.cpp [WebAssembly] Add new export_name clang attribute for controlling wasm export names 2019-12-11 11:54:57 -08:00
WinCOFFObjectWriter.cpp Revert "[COFF] Make the autogenerated .weak.<name>.default symbols static" 2019-12-28 23:45:50 +02:00
XCOFFObjectWriter.cpp [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00