From: Owen Anderson Date: Fri, 29 Jul 2011 23:01:18 +0000 (+0000) Subject: Correctly handle scattered operands where the bits of the operand are contiguous... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=eb809f562e13603459182a5d1c7b0d0704770e6f Correctly handle scattered operands where the bits of the operand are contiguous, but out of order. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136534 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/FixedLenDecoderEmitter.cpp b/utils/TableGen/FixedLenDecoderEmitter.cpp index 80910032886..b87634bfee4 100644 --- a/utils/TableGen/FixedLenDecoderEmitter.cpp +++ b/utils/TableGen/FixedLenDecoderEmitter.cpp @@ -1295,6 +1295,11 @@ static bool populateInstruction(const CodeGenInstruction &CGI, Base = bi; Width = 1; Offset = BI->getBitNum(); + } else if (BI->getBitNum() != Offset + Width) { + OpInfo.addField(Base, Width, Offset); + Base = bi; + Width = 1; + Offset = BI->getBitNum(); } else { ++Width; }