diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-12-17 22:37:50 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-12-17 22:37:50 +0000 |
commit | af73dfe6f1703aafa79f0c57ef2bd154be154686 (patch) | |
tree | cd0175afa91992ecb1c62e05ea59ba9bac0e7633 /utils/TableGen/CodeGenTarget.h | |
parent | 51037451f9d00c1a44128c54fe30e8acafc7bd4a (diff) |
Support little-endian encodings in the FixedLenDecoderEmitter
The convention used to specify the PowerPC ISA is that bits are numbered in
reverse order (0 is the index of the high bit). To support this "little endian"
encoding convention, CodeEmitterGen will reverse the bit numberings prior to
generating the encoding tables. In order to generate a disassembler,
FixedLenDecoderEmitter needs to do the same.
This moves the bit reversal logic out of CodeEmitterGen and into CodeGenTarget
(where it can be used by both CodeEmitterGen and FixedLenDecoderEmitter). This
is prep work for disassembly support in the PPC backend (which is the only
in-tree user of this little-endian encoding support).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197532 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.h')
-rw-r--r-- | utils/TableGen/CodeGenTarget.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenTarget.h b/utils/TableGen/CodeGenTarget.h index 6271443029..d6458f41cf 100644 --- a/utils/TableGen/CodeGenTarget.h +++ b/utils/TableGen/CodeGenTarget.h @@ -177,6 +177,10 @@ public: /// bool isLittleEndianEncoding() const; + /// reverseBitsForLittleEndianEncoding - For little-endian instruction bit + /// encodings, reverse the bit order of all instructions. + void reverseBitsForLittleEndianEncoding(); + /// guessInstructionProperties - should we just guess unset instruction /// properties? bool guessInstructionProperties() const; |