aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-10-11 21:31:22 +0000
committerJim Grosbach <grosbach@apple.com>2010-10-11 21:31:22 +0000
commit1a7233f9d08b20076ca71f7d95c673fd641b9c35 (patch)
tree30161bbb09a96f7b94f46c364c049b871aebb24d /utils
parent12647eb3f529880e882c9bc5cb88ffdbf51f851f (diff)
downloadexternal_llvm-1a7233f9d08b20076ca71f7d95c673fd641b9c35.zip
external_llvm-1a7233f9d08b20076ca71f7d95c673fd641b9c35.tar.gz
external_llvm-1a7233f9d08b20076ca71f7d95c673fd641b9c35.tar.bz2
Make sure to use the machine instruction operand number. It doesn't always
map one-to-one with the CodeGenInstruction operand number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116238 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CodeEmitterGen.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp
index 1a967e9..13eea6b 100644
--- a/utils/TableGen/CodeEmitterGen.cpp
+++ b/utils/TableGen/CodeEmitterGen.cpp
@@ -162,6 +162,8 @@ void CodeEmitterGen::run(raw_ostream &o) {
if (CGI.hasOperandNamed(VarName, OpIdx)) {
assert (!CGI.isFlatOperandNotEmitted(OpIdx) &&
"Explicitly used operand also marked as not emitted!");
+ // Get the machine operand number for the indicated operand.
+ OpIdx = CGI.OperandList[OpIdx].MIOperandNo;
} else {
/// If this operand is not supposed to be emitted by the
/// generated emitter, skip it.