diff options
author | Owen Anderson <resistor@mac.com> | 2011-07-29 23:01:18 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-07-29 23:01:18 +0000 |
commit | eb809f562e13603459182a5d1c7b0d0704770e6f (patch) | |
tree | 8944b15c4cdbc561c1802e1a53a1c43d3e927829 /utils/TableGen | |
parent | 73e7dced3892f2abb4344526147d4df0f62aee61 (diff) | |
download | llvm-eb809f562e13603459182a5d1c7b0d0704770e6f.tar.gz llvm-eb809f562e13603459182a5d1c7b0d0704770e6f.tar.bz2 llvm-eb809f562e13603459182a5d1c7b0d0704770e6f.tar.xz |
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
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/FixedLenDecoderEmitter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/TableGen/FixedLenDecoderEmitter.cpp b/utils/TableGen/FixedLenDecoderEmitter.cpp index 8091003288..b87634bfee 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; } |