From 9d95e8d5308c68e650445fc47694d76efef6047c Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Thu, 19 Dec 2013 14:58:22 +0000 Subject: [PATCH] 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 --- llvm/utils/TableGen/FixedLenDecoderEmitter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp index d2d3f3dd0764..0918d0b1dfa2 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");