From: Chris Lattner Date: Fri, 19 May 2006 21:57:37 +0000 (+0000) Subject: Fix misencoding of calling conventions X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ebf8e6cd924bb441398c406fa3a67d93c86a49dd;p=oota-llvm.git Fix misencoding of calling conventions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28411 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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]; }