From 558bc88a00930fce283b240b7c9555f649a18f1b Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Sat, 18 Jun 2005 18:34:52 +0000 Subject: core changes for varargs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/Interpreter/Execution.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'lib/ExecutionEngine/Interpreter/Execution.cpp') diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 11608b6bfa..a41d12af4f 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -988,18 +988,6 @@ void Interpreter::visitCastInst(CastInst &I) { SetValue(&I, executeCastOperation(I.getOperand(0), I.getType(), SF), SF); } -void Interpreter::visitVANextInst(VANextInst &I) { - ExecutionContext &SF = ECStack.back(); - - // Get the incoming valist parameter. LLI treats the valist as a - // (ec-stack-depth var-arg-index) pair. - GenericValue VAList = getOperandValue(I.getOperand(0), SF); - - // Move the pointer to the next vararg. - ++VAList.UIntPairVal.second; - SetValue(&I, VAList, SF); -} - #define IMPLEMENT_VAARG(TY) \ case Type::TY##TyID: Dest.TY##Val = Src.TY##Val; break @@ -1033,6 +1021,9 @@ void Interpreter::visitVAArgInst(VAArgInst &I) { // Set the Value of this Instruction. SetValue(&I, Dest, SF); + + // Move the pointer to the next vararg. + ++VAList.UIntPairVal.second; } //===----------------------------------------------------------------------===// -- cgit v1.2.3-18-g5258