summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsISelLowering.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-12-19 16:12:53 +0000
committerHal Finkel <hfinkel@anl.gov>2013-12-19 16:12:53 +0000
commitd715c3e9ac0c7e2e02b7f24821dd5df68f1c9a3c (patch)
tree2f46db261cdf7a4cf972946599bb4d16554b0d6f /lib/Target/Mips/MipsISelLowering.cpp
parentafe1c6b96d2a62fdb656e8c1689005c4a4a1e481 (diff)
downloadllvm-d715c3e9ac0c7e2e02b7f24821dd5df68f1c9a3c.tar.gz
llvm-d715c3e9ac0c7e2e02b7f24821dd5df68f1c9a3c.tar.bz2
llvm-d715c3e9ac0c7e2e02b7f24821dd5df68f1c9a3c.tar.xz
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
Diffstat (limited to 'lib/Target/Mips/MipsISelLowering.cpp')
0 files changed, 0 insertions, 0 deletions