summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeEmitterGen.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-05 03:01:52 +0000
committerChris Lattner <sabre@nondot.org>2006-09-05 03:01:52 +0000
commit8aa01f4b435b8e6871f63887cd2ee00b7530ee9c (patch)
treed87e9aad9b993950ac9c741223c0e2b0d9b1d6c6 /utils/TableGen/CodeEmitterGen.cpp
parent0e42d81a838bcccd3ed6aacd011a172633ce6606 (diff)
downloadllvm-8aa01f4b435b8e6871f63887cd2ee00b7530ee9c.tar.gz
llvm-8aa01f4b435b8e6871f63887cd2ee00b7530ee9c.tar.bz2
llvm-8aa01f4b435b8e6871f63887cd2ee00b7530ee9c.tar.xz
Fix JIT encoding of two-addr instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeEmitterGen.cpp')
-rw-r--r--utils/TableGen/CodeEmitterGen.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp
index f0a02872ce..3dcaea4300 100644
--- a/utils/TableGen/CodeEmitterGen.cpp
+++ b/utils/TableGen/CodeEmitterGen.cpp
@@ -161,6 +161,11 @@ void CodeEmitterGen::run(std::ostream &o) {
+ utostr(op++)
+ "));\n";
gotOp = true;
+
+ // If this is a two-address instruction and we just got the dest
+ // op, skip the src op.
+ if (op == 1 && Target.getInstruction(InstName).isTwoAddress)
+ ++op;
}
unsigned opMask = (1 << N) - 1;