1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib/MC
Wouter van Oortmerssen 538b137e0b [WebAssembly] Added initial type checker to MC Assembler
This to protect against non-sensical instruction sequences being assembled,
which would either cause asserts/crashes further down, or a Wasm module being output that doesn't validate.

Unlike a validator, this type checker is able to give type-errors as part of the parsing process, which makes the assembler much friendlier to be used by humans writing manual input.

Because the MC system is single pass (instructions aren't even stored in MC format, they are directly output) the type checker has to be single pass as well, which means that from now on .globaltype and .functype decls must come before their use. An extra pass is added to Codegen to collect information for this purpose, since AsmPrinter is normally single pass / streaming as well, and would otherwise generate this information on the fly.

A `-no-type-check` flag was added to llvm-mc (and any other tools that take asm input) that surpresses type errors, as a quick escape hatch for tests that were not intended to be type correct.

This is a first version of the type checker that ignores control flow, i.e. it checks that types are correct along the linear path, but not the branch path. This will still catch most errors. Branch checking could be added in the future.

Differential Revision: https://reviews.llvm.org/D104945
2021-07-09 14:07:25 -07:00
..
MCDisassembler
MCParser [ms] [llvm-ml] Standardize blocking of lexical substitution 2021-07-02 14:17:37 -04:00
CMakeLists.txt
ConstantPools.cpp
ELFObjectWriter.cpp [MC][ELF] Change SHT_LLVM_CALL_GRAPH_PROFILE relocations from SHT_RELA to SHT_REL 2021-06-24 21:35:48 -07:00
MachObjectWriter.cpp
MCAsmBackend.cpp RISCV: adjust handling of relocation emission for RISCV 2021-06-17 08:20:02 -07:00
MCAsmInfo.cpp [AIX] Use AsmParser to do inline asm parsing 2021-07-02 16:12:21 +00:00
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
MCAsmInfoWasm.cpp
MCAsmInfoXCOFF.cpp [AIX] Use AsmParser to do inline asm parsing 2021-07-02 16:12:21 +00:00
MCAsmMacro.cpp
MCAsmStreamer.cpp [MCStreamer] Move emission of attributes section into MCELFStreamer 2021-06-30 16:00:27 -05:00
MCAssembler.cpp RISCV: adjust handling of relocation emission for RISCV 2021-06-17 08:20:02 -07:00
MCCodeEmitter.cpp
MCCodeView.cpp
MCContext.cpp PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
MCDwarf.cpp RISCV: adjust handling of relocation emission for RISCV 2021-06-17 08:20:02 -07:00
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp [MCStreamer] Move emission of attributes section into MCELFStreamer 2021-06-30 16:00:27 -05:00
MCExpr.cpp RISCV: adjust handling of relocation emission for RISCV 2021-06-17 08:20:02 -07:00
MCFragment.cpp
MCInst.cpp
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCInstrDesc.cpp
MCInstrInfo.cpp
MCLabel.cpp
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp
MCNullStreamer.cpp
MCObjectFileInfo.cpp
MCObjectStreamer.cpp RISCV: adjust handling of relocation emission for RISCV 2021-06-17 08:20:02 -07:00
MCObjectWriter.cpp
MCPseudoProbe.cpp
MCRegisterInfo.cpp
MCSchedule.cpp
MCSection.cpp
MCSectionCOFF.cpp
MCSectionELF.cpp
MCSectionMachO.cpp
MCSectionWasm.cpp
MCSectionXCOFF.cpp
MCStreamer.cpp Implement DW_CFA_LLVM_* for Heterogeneous Debugging 2021-06-14 08:51:50 +05:30
MCSubtargetInfo.cpp
MCSymbol.cpp
MCSymbolELF.cpp
MCSymbolXCOFF.cpp
MCTargetOptions.cpp [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
MCTargetOptionsCommandFlags.cpp [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
MCValue.cpp
MCWasmObjectTargetWriter.cpp
MCWasmStreamer.cpp
MCWin64EH.cpp
MCWinCOFFStreamer.cpp
MCWinEH.cpp
MCXCOFFObjectTargetWriter.cpp
MCXCOFFStreamer.cpp
StringTableBuilder.cpp [ADT] Move DenseMapInfo for ArrayRef/StringRef into respective headers (NFC) 2021-06-03 18:34:36 +02:00
SubtargetFeature.cpp
WasmObjectWriter.cpp [WebAssembly] Make tag attribute's encoding uint8 2021-06-21 21:22:39 -07:00
WinCOFFObjectWriter.cpp
XCOFFObjectWriter.cpp [XCOFF][NFC] add DWARF section support in XCOFF object writer 2021-07-05 03:13:29 +00:00