[llvm-commits] [llvm] r116238 - /llvm/trunk/utils/TableGen/CodeEmitterGen.cpp
Jim Grosbach
grosbach at apple.com
Mon Oct 11 14:31:23 PDT 2010
Author: grosbach
Date: Mon Oct 11 16:31:22 2010
New Revision: 116238
URL: http://llvm.org/viewvc/llvm-project?rev=116238&view=rev
Log:
Make sure to use the machine instruction operand number. It doesn't always
map one-to-one with the CodeGenInstruction operand number.
Modified:
llvm/trunk/utils/TableGen/CodeEmitterGen.cpp
Modified: llvm/trunk/utils/TableGen/CodeEmitterGen.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeEmitterGen.cpp?rev=116238&r1=116237&r2=116238&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeEmitterGen.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeEmitterGen.cpp Mon Oct 11 16:31:22 2010
@@ -162,6 +162,8 @@
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.
More information about the llvm-commits
mailing list