llvm-6502/test
Petr Pavlu d2e1e42c1a [TableGen] Improve decoding options for non-orthogonal instructions
When FixedLenDecoder matches an input bitpattern of form [01]+ with an
instruction bitpattern of form [01?]+ (where 0/1 are static bits and ? are
mixed/variable bits) it passes the input bitpattern to a specific instruction
decoder method which then makes a final decision whether the bitpattern is a
valid instruction or not. This means the decoder must handle all possible
values of the variable bits which sometimes leads to opcode rewrites in the
decoder method when the instructions are not fully orthogonal.

The patch provides a way for the decoder method to say that when it returns
Fail it does not necessarily mean the bitpattern is invalid, but rather that
the bitpattern is definitely not an instruction that is recognized by the
decoder method. The decoder can then try to match the input bitpattern with
other possible instruction bitpatterns.

For example, this allows to solve a situation on AArch64 where the `MSR
(immediate)` instruction has form:
1101 0101 0000 0??? 0100 ???? ???1 1111
but not all values of the ? bits are allowed. The rejected values should be
handled by the `extended MSR (register)` instruction:
1101 0101 000? ???? ???? ???? ???? ????

The decoder will first try to decode an input bitpattern that matches both
bitpatterns as `MSR (immediate)` but currently this puts the decoder method of
`MSR (immediate)` into a situation when it must be able to decode all possible
values of the ? bits, i.e. it would need to rewrite the instruction to `MSR
(register)` when it is not `MSR (immediate)`.

The patch allows to specify that the decoder method cannot determine if the
instruction is valid for all variable values. The decoder method can simply
return Fail when it knows it is definitely not `MSR (immediate)`. The decoder
will then backtrack the decoding and find that it can match the input
bitpattern with the more generic `MSR (register)` bitpattern too.

Differential Revision: http://reviews.llvm.org/D7174


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-15 08:04:27 +00:00
..
Analysis Cleanup after r241809 - remove uncessary call to std::sort 2015-07-13 14:48:24 +00:00
Assembler Extended syntax of vector version of getelementptr instruction. 2015-07-09 07:42:48 +00:00
Bindings test: Move target dependent test in their own folder for c API test 2015-06-23 06:46:54 +00:00
Bitcode Add argmemonly attribute. 2015-07-11 10:30:36 +00:00
BugPoint
CodeGen [X86][SSE] Added i686/SSE2 vector shift tests. 2015-07-15 08:04:07 +00:00
DebugInfo [CodeView] Add support for emitting column information 2015-07-09 00:19:51 +00:00
ExecutionEngine [Mips] Add support for MCJIT for MIPS32r6 2015-07-06 12:50:55 +00:00
Feature Revert the new EH instructions 2015-07-10 07:15:17 +00:00
FileCheck
Instrumentation [SanitizerCoverage] Don't add instrumentation to unreachable blocks. 2015-06-30 23:11:45 +00:00
Integer
JitListener
LibDriver LibDriver: Fix output path inference. 2015-07-08 19:00:46 +00:00
Linker Linker: Do not expect comdat to exist in source module. 2015-06-22 21:46:51 +00:00
LTO Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
MC AArch64: add rev64 alias for 64-bit rev instruction. 2015-07-14 17:07:29 +00:00
Object Initial support for writing thin archives. 2015-07-15 05:47:46 +00:00
Other [llvm-extract] Drop comdats from declarations 2015-07-06 18:48:02 +00:00
SymbolRewriter
TableGen [TableGen] Improve decoding options for non-orthogonal instructions 2015-07-15 08:04:27 +00:00
tools [llvm-readobj] Print MIPS PLT table 2015-07-09 18:23:10 +00:00
Transforms Tidy-up test case from r242257. 2015-07-15 01:51:51 +00:00
Unit
Verifier Revert the new EH instructions 2015-07-10 07:15:17 +00:00
YAMLParser
.clang-format
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
lit.cfg LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh