From ebf8e6cd924bb441398c406fa3a67d93c86a49dd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 19 May 2006 21:57:37 +0000 Subject: [PATCH] Fix misencoding of calling conventions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28411 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bytecode/Writer/Writer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index 80abcacee97..4ec6b2a41e8 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -734,8 +734,9 @@ void BytecodeWriter::outputInstruction(const Instruction &I) { // If this is the escape sequence for call, emit the tailcall/cc info. const CallInst &CI = cast(I); ++NumOperands; - if (NumOperands < 3) { - Slots[NumOperands-1] = (CI.getCallingConv() << 1)|unsigned(CI.isTailCall()); + if (NumOperands <= 3) { + Slots[NumOperands-1] = + (CI.getCallingConv() << 1)|unsigned(CI.isTailCall()); if (Slots[NumOperands-1] > MaxOpSlot) MaxOpSlot = Slots[NumOperands-1]; } -- 2.34.1