summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-12-19 14:58:22 +0000
committerHal Finkel <hfinkel@anl.gov>2013-12-19 14:58:22 +0000
commit9d95e8d5308c68e650445fc47694d76efef6047c (patch)
tree35377283311544f0b098756e3477f2ab5fd6bef4 /llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
parenta284e559d7d84afa4c5b91bdfa7096e307e9f4c2 (diff)
downloadbcm5719-llvm-9d95e8d5308c68e650445fc47694d76efef6047c.tar.gz
bcm5719-llvm-9d95e8d5308c68e650445fc47694d76efef6047c.zip
Add support for PointerLikeRegClass to FixedLenDecoderEmitter
This is more prep for adding the PowerPC disassembler. FixedLenDecoderEmitter should recognize PointerLikeRegClass operands as register types, and generate register-like decoding calls instead of treating them like immediates. llvm-svn: 197680
Diffstat (limited to 'llvm/utils/TableGen/FixedLenDecoderEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/FixedLenDecoderEmitter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
index d2d3f3dd076..0918d0b1dfa 100644
--- a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
+++ b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
@@ -1771,6 +1771,10 @@ static bool populateInstruction(const CodeGenInstruction &CGI, unsigned Opc,
if (TypeRecord->isSubClassOf("RegisterClass")) {
Decoder = "Decode" + TypeRecord->getName() + "RegisterClass";
isReg = true;
+ } else if (TypeRecord->isSubClassOf("PointerLikeRegClass")) {
+ Decoder = "DecodePointerLikeRegClass" +
+ utostr(TypeRecord->getValueAsInt("RegClassKind"));
+ isReg = true;
}
RecordVal *DecoderString = TypeRecord->getValue("DecoderMethod");
OpenPOWER on IntegriCloud