aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-06-18 18:34:52 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-06-18 18:34:52 +0000
commit558bc88a00930fce283b240b7c9555f649a18f1b (patch)
treecb2953e86c8a44260ab9f896e694fd77b19b9ad7 /lib/ExecutionEngine
parentf5428213853bae45247fe6da711ff20954d73dbd (diff)
downloadexternal_llvm-558bc88a00930fce283b240b7c9555f649a18f1b.zip
external_llvm-558bc88a00930fce283b240b7c9555f649a18f1b.tar.gz
external_llvm-558bc88a00930fce283b240b7c9555f649a18f1b.tar.bz2
core changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/Interpreter/Execution.cpp15
-rw-r--r--lib/ExecutionEngine/Interpreter/Interpreter.h1
2 files changed, 3 insertions, 13 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index 11608b6bf..a41d12a 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;
}
//===----------------------------------------------------------------------===//
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h
index 2e83f5e..180d092 100644
--- a/lib/ExecutionEngine/Interpreter/Interpreter.h
+++ b/lib/ExecutionEngine/Interpreter/Interpreter.h
@@ -153,7 +153,6 @@ public:
void visitShl(ShiftInst &I);
void visitShr(ShiftInst &I);
- void visitVANextInst(VANextInst &I);
void visitVAArgInst(VAArgInst &I);
void visitInstruction(Instruction &I) {
std::cerr << I;