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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197680 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Hal Finkel 2013-12-19 14:58:22 +00:00
parent de011a5f90
commit e14ad8538f

View File

@ -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");