1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/include/llvm/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 [MC][AMDGPU][llvm-objdump] Synthesized local labels in disassembly 2021-04-26 13:56:36 +01:00
MCParser [MCStreamer] Move emission of attributes section into MCELFStreamer 2021-06-30 16:00:27 -05:00
ConstantPools.h
LaneBitmask.h [NFC] Add missing include to LaneBitmask.h to fix modules build 2021-06-07 18:43:00 +02:00
MachineLocation.h
MCAsmBackend.h RISCV: adjust handling of relocation emission for RISCV 2021-06-17 08:20:02 -07:00
MCAsmInfo.h [AIX] Use AsmParser to do inline asm parsing 2021-07-02 16:12:21 +00:00
MCAsmInfoCOFF.h
MCAsmInfoDarwin.h
MCAsmInfoELF.h
MCAsmInfoWasm.h
MCAsmInfoXCOFF.h
MCAsmLayout.h
MCAsmMacro.h [ms] [llvm-ml] Implement the statement expansion operator 2020-11-30 14:33:24 -05:00
MCAssembler.h [MC] Support .symver *, *, remove 2021-03-06 15:23:02 -08:00
MCCodeEmitter.h
MCCodeView.h [MC] Delete unused declarations 2020-12-06 15:36:39 -08:00
MCContext.h [MC][ELF] Emit unique sections for different flags 2021-05-26 11:51:29 +01:00
MCDirectives.h
MCDwarf.h RISCV: adjust handling of relocation emission for RISCV 2021-06-17 08:20:02 -07:00
MCELFObjectWriter.h MC: mark dump with LLVM_DUMP_METHOD 2021-05-27 10:47:39 -07:00
MCELFStreamer.h [MCStreamer] Move emission of attributes section into MCELFStreamer 2021-06-30 16:00:27 -05:00
MCExpr.h [AIX][TLS] Add ASM portion changes to support TLSGD relocations to XCOFF objects 2021-04-29 13:18:59 -05:00
MCFixedLenDisassembler.h
MCFixup.h RISCV: adjust handling of relocation emission for RISCV 2021-06-17 08:20:02 -07:00
MCFixupKindInfo.h
MCFragment.h PR51018: A few more explicit conversions from SmallString to StringRef 2021-07-09 13:54:02 -07:00
MCInst.h [MC] Add the ability to pass MCRegisterInfo to dump_pretty. 2021-05-14 18:21:57 -07:00
MCInstBuilder.h [WebAssembly] Support single-floating-point immediate value 2021-02-04 18:05:06 -08:00
MCInstPrinter.h [llvm-mc] Add -M to replace -riscv-no-aliases and -riscv-arch-reg-names 2021-05-26 10:43:32 -07:00
MCInstrAnalysis.h
MCInstrDesc.h [MC] MCInstrDesc.h - remove unnecessary <string> include. NFCI. 2021-04-21 15:07:00 +01:00
MCInstrInfo.h
MCInstrItineraries.h
MCLabel.h
MCLinkerOptimizationHint.h
MCMachObjectWriter.h [MC] Delete unused declarations 2020-12-06 15:36:39 -08:00
MCObjectFileInfo.h [MC] Add getLSDASection interface 2021-06-05 00:28:20 -07:00
MCObjectStreamer.h [XCOFF][DebugInfo] support DWARF for XCOFF for assembly output. 2021-03-04 21:07:52 -05:00
MCObjectWriter.h [MC] Change ELFOSABI_NONE to ELFOSABI_GNU for SHF_GNU_RETAIN 2021-03-09 09:59:47 -08:00
MCPseudoProbe.h [CSSPGO] Undoing the concept of dangling pseudo probe 2021-06-18 15:14:11 -07:00
MCRegister.h [MC] Add missing include (NFC) 2021-06-03 18:50:00 +02:00
MCRegisterInfo.h Add register size info back to MCRegisterClass 2021-03-23 15:04:44 -07:00
MCSchedule.h [MCA] Add support for in-order CPUs 2021-03-04 14:08:19 +03:00
MCSection.h
MCSectionCOFF.h
MCSectionELF.h [MC][ELF] Support for zero flag section groups 2021-02-16 14:23:40 -08:00
MCSectionMachO.h Support #pragma clang section directives on MachO targets 2021-02-25 09:30:10 -08:00
MCSectionWasm.h Reland: "[lld][WebAssembly] Initial support merging string data" 2021-05-10 16:03:38 -07:00
MCSectionXCOFF.h [AIX][TLS] Add assert check of valid csect type for the storage mapping class XCOFF::XMC_UL 2021-03-08 14:18:57 -06:00
MCStreamer.h [MCStreamer] Move emission of attributes section into MCELFStreamer 2021-06-30 16:00:27 -05:00
MCSubtargetInfo.h AMDGPU: Add target id and code object v4 support 2021-03-24 11:54:05 -04:00
MCSymbol.h [MC][ELF] Remove unneeded MCSymbol::setExternal calls 2020-12-20 21:26:36 -08:00
MCSymbolCOFF.h
MCSymbolELF.h
MCSymbolMachO.h
MCSymbolWasm.h [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
MCSymbolXCOFF.h
MCTargetOptions.h [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
MCTargetOptionsCommandFlags.h [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
MCValue.h
MCWasmObjectWriter.h [WebAssembly] Add new relocation for location relative data 2021-03-08 11:34:10 -08:00
MCWasmStreamer.h [WebAssembly][MC] Remove useless overrides in MCWasmStreamer 2020-11-17 07:09:49 -08:00
MCWin64EH.h Reapply "[CodeGen] [WinException] Only produce handler data at the end of the function if needed" 2020-11-23 23:17:03 +02:00
MCWinCOFFObjectWriter.h
MCWinCOFFStreamer.h
MCWinEH.h Reapply "[CodeGen] [WinException] Only produce handler data at the end of the function if needed" 2020-11-23 23:17:03 +02:00
MCXCOFFObjectWriter.h
MCXCOFFStreamer.h
SectionKind.h [AIX][TLS] Generate TLS variables in assembly files 2021-03-02 18:22:48 -06:00
StringTableBuilder.h
SubtargetFeature.h [ARM][AArch64] Adding Neoverse V1 CPU support 2020-11-09 13:15:40 +00:00