summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeEmitterGen.cpp
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
commit11ced671be20cecb1c0aca68af4f7e32418917e6 (patch)
tree8f0b04ecdf38ed0db10f448c79aa017553c051e5 /llvm/utils/TableGen/CodeEmitterGen.cpp
parentf3f903a9f0554b484523fa811f5686256e430d5f (diff)
downloadbcm5719-llvm-11ced671be20cecb1c0aca68af4f7e32418917e6.tar.gz
bcm5719-llvm-11ced671be20cecb1c0aca68af4f7e32418917e6.zip
Make sure to use the machine instruction operand number. It doesn't always
map one-to-one with the CodeGenInstruction operand number. llvm-svn: 116238
Diffstat (limited to 'llvm/utils/TableGen/CodeEmitterGen.cpp')
-rw-r--r--llvm/utils/TableGen/CodeEmitterGen.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeEmitterGen.cpp b/llvm/utils/TableGen/CodeEmitterGen.cpp
index 1a967e9742c..13eea6be090 100644
--- a/llvm/utils/TableGen/CodeEmitterGen.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud