llvm-6502/utils/TableGen
Hal Finkel d715c3e9ac Add support for positionally-encoded operands to FixedLenDecoderEmitter
Unfortunately, the PowerPC instruction definitions make heavy use of the
positional operand encoding heuristic to map operands onto bitfield variables
in the instruction definitions. Changing this to use name-based mapping is not
trivial, however, because additional infrastructure needs to be designed to
handle mapping of complex operands (with multiple suboperands) onto multiple
bitfield variables.

In the mean time, this adds support for positionally encoded operands to
FixedLenDecoderEmitter, so that we can generate a disassembler for the PowerPC
backend. To prevent an accidental reliance on this feature, and to prevent an
undesirable interaction with existing disassemblers, a backend must opt-in to
this support by setting the new decodePositionallyEncodedOperands
instruction-set bit to true.

When enabled, this iterates the variables that contribute to the instruction
encoding, just as the encoder does, and emulates the procedure the encoder uses
to map "numbered" operands to variables. The bit range for each variable is
also determined as the encoder determines them. This map is then consulted
during the decoder-generator's loop over operands to decode, allowing the
decoder to understand both position-based and name-based operand-to-variable
mappings.

As noted in the comment on the decodePositionallyEncodedOperands definition,
this support should be removed once it is no longer needed. There should be no
change to existing disassemblers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197691 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 16:12:53 +00:00
..
AsmMatcherEmitter.cpp
AsmWriterEmitter.cpp Remove dead code. 2013-12-02 05:10:04 +00:00
AsmWriterInst.cpp Remove dead code. 2013-12-02 05:10:04 +00:00
AsmWriterInst.h Remove dead code. 2013-12-02 05:10:04 +00:00
CallingConvEmitter.cpp
CMakeLists.txt
CodeEmitterGen.cpp Support little-endian encodings in the FixedLenDecoderEmitter 2013-12-17 22:37:50 +00:00
CodeGenDAGPatterns.cpp
CodeGenDAGPatterns.h
CodeGenInstruction.cpp
CodeGenInstruction.h
CodeGenIntrinsics.h
CodeGenMapTable.cpp Correct word hyphenations 2013-12-05 05:44:44 +00:00
CodeGenRegisters.cpp
CodeGenRegisters.h
CodeGenSchedule.cpp [weak vtables] Place class definitions into anonymous namespaces to prevent weak vtables. 2013-11-19 03:08:35 +00:00
CodeGenSchedule.h
CodeGenTarget.cpp Support little-endian encodings in the FixedLenDecoderEmitter 2013-12-17 22:37:50 +00:00
CodeGenTarget.h Support little-endian encodings in the FixedLenDecoderEmitter 2013-12-17 22:37:50 +00:00
CTagsEmitter.cpp
DAGISelEmitter.cpp
DAGISelMatcher.cpp
DAGISelMatcher.h
DAGISelMatcherEmitter.cpp
DAGISelMatcherGen.cpp
DAGISelMatcherOpt.cpp
DFAPacketizerEmitter.cpp
DisassemblerEmitter.cpp
FastISelEmitter.cpp
FixedLenDecoderEmitter.cpp Add support for positionally-encoded operands to FixedLenDecoderEmitter 2013-12-19 16:12:53 +00:00
InstrInfoEmitter.cpp [weak vtables] Remove a bunch of weak vtables 2013-11-19 00:57:56 +00:00
IntrinsicEmitter.cpp
LLVMBuild.txt
Makefile
OptParserEmitter.cpp
PseudoLoweringEmitter.cpp
RegisterInfoEmitter.cpp
SequenceToOffsetTable.h
SetTheory.cpp [weak vtables] Remove a bunch of weak vtables 2013-11-19 00:57:56 +00:00
SetTheory.h
SubtargetEmitter.cpp
TableGen.cpp
TableGenBackends.h
tdtags
TGValueTypes.cpp [weak vtables] Place class definitions into anonymous namespaces to prevent weak vtables. 2013-11-19 03:08:35 +00:00
X86DisassemblerShared.h
X86DisassemblerTables.cpp
X86DisassemblerTables.h
X86ModRMFilters.cpp
X86ModRMFilters.h
X86RecognizableInstr.cpp AVX-512: Added legal type MVT::i1 and VK1 register for it. 2013-12-16 13:52:35 +00:00
X86RecognizableInstr.h