llvm-project/llvm/test/MC
Wouter van Oortmerssen 9647a6f719 [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
..
AArch64 [Aarch64] Adding support for Armv9-A Realm Management Extension 2021-06-28 13:45:22 +01:00
AMDGPU [test] Change -t to --syms and -s to -S for llvm-readobj RUN lines 2021-06-29 11:50:31 -07:00
ARM [ARMInstPrinter] Print the target address of a branch instruction 2021-06-30 16:35:28 +07:00
AVR [AVR] Add register aliases XL, YH, etc 2021-03-03 15:36:05 +01:00
AsmParser [MCParser][z/OS] Mark a few tests as unsupported for the z/OS Target 2021-07-05 11:06:52 -04:00
BPF
COFF [AArch64][X86] Allow 64-bit label differences lower to IMAGE_REL_*_REL32 2021-06-21 14:32:25 -07:00
CSKY [CSKY 6/n] Add support branch and symbol series instruction 2021-04-20 15:36:49 +08:00
Disassembler [ARMInstPrinter] Print the target address of a branch instruction 2021-06-30 16:35:28 +07:00
ELF [MCParser][z/OS] Mark a few tests as unsupported for the z/OS Target 2021-07-05 11:06:52 -04:00
Hexagon Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
Lanai
M68k [M68k][test][NFC] Scrubing some tests 2021-05-05 17:48:28 -07:00
MSP430 [llvm-readobj] Update tests because of changes in llvm-readobj behavior 2020-07-20 10:39:04 +01:00
MachO Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
Mips [MC] Remove unneeded "in '.xxx' directive" from diagnostics 2021-05-04 13:30:29 -07:00
PowerPC [PowerPC] Export 16 byte load-store instructions 2021-06-15 01:56:10 +00:00
RISCV RISCV: simplify a test case for RISCV (NFCI) 2021-06-18 08:19:16 -07:00
Sparc [SPARC] recognize the "rd %pc, reg" special form 2021-05-23 22:52:59 +02:00
SystemZ [SystemZ] Add support for .reloc assembler directive 2021-06-25 21:51:10 +02:00
VE [VE] Add missing BCR format 2020-10-29 23:30:49 +09:00
WebAssembly [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
X86 [DebugInfo] Bug 41152 - Improve dumping of empty location expressions 2021-06-29 09:21:00 +01:00
XCOFF [AIX] Add dummy XCOFF MCAsmParserExtension 2021-07-02 16:12:21 +00:00