From 8aa01f4b435b8e6871f63887cd2ee00b7530ee9c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 5 Sep 2006 03:01:52 +0000 Subject: [PATCH] Fix JIT encoding of two-addr instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30111 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/CodeEmitterGen.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp index f0a02872ceb..3dcaea43007 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; -- 2.34.1